CVE-2026-42589
Description
Gotenberg is a Docker-powered stateless API for PDF files. Prior to 8.31.0, Gotenberg's /forms/pdfengines/metadata/write HTTP endpoint accepts a JSON metadata object and passes its keys directly to ExifTool via the go-exiftool library. No validation is performed on key characters. A \n embedded in a JSON key splits the ExifTool stdin stream into a new argument line, allowing an attacker to inject arbitrary ExifTool flags — including -if, which evaluates Perl expressions. This achieves unauthenticated OS command execution in a single HTTP request. The response is HTTP 200 with a valid PDF, making the attack transparent to basic monitoring. This vulnerability is fixed in 8.31.0.
Weakness
- CWE-78: Improper Neutralization of Special Elements used in an OS Command
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | yes |
| Technical impact | total |
| Scored | 2026-05-14 |
Timeline
- 2026-05-07GitHub advisory published (GHSA-rqgh-gxv4-6657)7 days before publication
- 2026-05-14Published by the CNA15:11 UTC
- 2026-05-14CISA SSVC decision recordedsame day
Exploit and advisory records
Nuclei templates:
- CVE-2026-42589: Gotenberg - Command Injection
GitHub advisory GHSA-rqgh-gxv4-6657, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Go github.com/gotenberg/gotenberg/v8 | 8.29.1 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| thecodingmachine gotenberg | before 8.31.0fixed in 8.31.0 | 8.31.0 |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-42589'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-42589'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-42589'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-42589'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).