Gotenberg
Gotenberg: Unauthenticated RCE via ExifTool Metadata Key Injection
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 8.31.0
Fixed in 8.31.0
Mitigation
Upgrade gotenberg to 8.31.0 or later.
References
- Vendor advisory github.com/gotenberg/gotenberg/security/adviso…
Timeline
Days relative to CVE publicationFirst public PoC 16 days after publication; not in CISA KEV. First PoC: fineman999/POC_CVE-2026-42589 (created 30 May 2026, found by us: backfilled).
PoC repositories
Found on GitHub.2 PoCs
PoCs 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| fineman999/POC_CVE-2026-42589 | 30 May 2026 +16 d | 3 | PoC |
| HackfutSecRoot/-GOTENBERG-RCE-CHAIN | 3 Oct 2026 +142 d | 2 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Gotenberg - Command Injection | 30 May 2026 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 2 PoC reposPOST /forms/pdfengines/metadata/write
- Key headers
Accept: */*- Body markers
--BOUNDARY Content-Disposition: form-data; name="files"; filename="test.pdf" Content-Type: application/pdf------NucleiBoundaryCVE202642589 Content-Disposition: form-data; name="files"; filename="sample.pdf" Content-Type: appliinmultipart/form-data; boundary=...- Ports
- 3000, 5000, 8000, 8080
- PoC User-Agent
Mozilla/5.0- Seen in
- 2 repos: HackfutSecRoot/-GOTENBERG-RCE-CHAIN, fineman999/POC_CVE-2026-42589
- Evidence
- HackfutSecRoot/-GOTENBERG-RCE-CHAIN/README.md:261 HackfutSecRoot/-GOTENBERG-RCE-CHAIN/auto_revshell.py:261 HackfutSecRoot/-GOTENBERG-RCE-CHAIN/auto_revshell.py:302 HackfutSecRoot/-GOTENBERG-RCE-CHAIN/gotenberg_rce.py:227 HackfutSecRoot/-GOTENBERG-RCE-CHAIN/gotenberg_rce.py:268 fineman999/POC_CVE-2026-42589/CVE-2026-42589.yaml:42
GET /forms/pdfengines/metadata/write
- Ports
- 3000, 5000, 8000, 8080
- Seen in
- 1 repo: HackfutSecRoot/-GOTENBERG-RCE-CHAIN
- Evidence
- HackfutSecRoot/-GOTENBERG-RCE-CHAIN/auto_revshell.py:745 HackfutSecRoot/-GOTENBERG-RCE-CHAIN/gotenberg_rce.py:518
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/forms/pdfengines/metadata/write(?:[?#].*)?$
(?i)^/forms/pdfengines/metadata/write(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000,5000,8000,8080] (msg:"GG PoC-Monitor CVE-2026-42589 gotenberg gotenberg exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/forms/pdfengines/metadata/write"; http.header; content:"Accept: */*"; nocase; http.request_body; content:"--BOUNDARY Content-Disposition: form-data|3b| name=|22|files|22||3b| filename=|22|test.pdf|22| Content-Type: application/pdf"; http.request_body; content:"------NucleiBoundaryCVE202642589 Content-Disposition: form-data|3b| name=|22|files|22||3b| filename=|22|sample.pdf|22| Content-Type: appli"; reference:url,poc.griffinguard.io/cve/CVE-2026-42589; classtype:web-application-attack; sid:9476629; rev:1;)
alert http any any -> $HOME_NET [3000,5000,8000,8080] (msg:"GG PoC-Monitor CVE-2026-42589 gotenberg gotenberg exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/forms/pdfengines/metadata/write"; reference:url,poc.griffinguard.io/cve/CVE-2026-42589; classtype:web-application-attack; sid:9320773; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: gotenberg gotenberg exploit attempt (CVE-2026-42589)
id: gg-pocmon-cve-2026-42589-9476629
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42589. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42589
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/forms/pdfengines/metadata/write'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42589
title: gotenberg gotenberg exploit attempt (CVE-2026-42589)
id: gg-pocmon-cve-2026-42589-9320773
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42589. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42589
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/forms/pdfengines/metadata/write'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42589