Gotenberg
Gotenberg vulnerable to argument injection via newlines in ExifTool metadata values
Gotenberg is a Docker-powered stateless API for PDF files. In versions 8.30.1 and earlier, the metadata write endpoint validates metadata keys for control characters but leaves metadata values unsanitized. A newline character in a metadata value splits the ExifTool stdin line into two separate arguments, allowing injection of arbitrary ExifTool pseudo-tags such as -FileName, -Directory, -SymLink, and -HardLink. This is a bypass of the incomplete key-sanitization fix introduced in v8.30.1. An unauthenticated attacker can rename or move any PDF being processed to an arbitrary path in the container filesystem, overwrite arbitrary files, or create symlinks and hard links at arbitrary paths.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- <= 8.30.1
- < 8.31.0
Fixed in 8.31.0
from GitHub Security Advisory GHSA-q7r4-hc83-hf2q
Mitigation
Upgrade github.com/gotenberg/gotenberg/v8 to 8.31.0 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 145 days after publication; not in CISA KEV. First PoC: nuclei template: Gotenberg <= 8.30.1 - Remote Code Execution (nuclei template, 28 Sep 2026).
PoC repositories
Found on GitHub.3 PoCs
PoCs 3
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 0xgh057r3c0n/CVE-2026-40281 | 1 Oct 2026 +148 d | 0 | PoC |
| HackfutSecRoot/-GOTENBERG-RCE-CHAIN | 3 Oct 2026 +150 d | 2 | PoC |
| rabakuku/CVE-2026-40281 | 5 Oct 2026 +151 d | 0 | 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 <= 8.30.1 - Remote Code Execution | 28 Sep 2026 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 3 PoC reposPOST /forms/pdfengines/metadata/write
- Key headers
Accept: */*- Body markers
------WebKitFormBoundary--BOUNDARY Content-Disposition: form-data; name="files"; filename="test.pdf" Content-Type: application/pdffiles=@test.pdf;type=application/pdfinmultipart/form-data; boundary={var}- Ports
- 3000, 5000, 8000, 8080
- PoC User-Agent
Mozilla/5.0- Seen in
- 3 repos: 0xgh057r3c0n/CVE-2026-40281, HackfutSecRoot/-GOTENBERG-RCE-CHAIN, rabakuku/CVE-2026-40281
- Evidence
- 0xgh057r3c0n/CVE-2026-40281/CVE-2026-40281.py:173 0xgh057r3c0n/CVE-2026-40281/CVE-2026-40281.yaml:41 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
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-40281 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:"------WebKitFormBoundary"; 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:"files=@test.pdf|3b|type=application/pdf"; reference:url,poc.griffinguard.io/cve/CVE-2026-40281; classtype:web-application-attack; sid:9394922; rev:1;)
alert http any any -> $HOME_NET [3000,5000,8000,8080] (msg:"GG PoC-Monitor CVE-2026-40281 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-40281; classtype:web-application-attack; sid:9712220; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: gotenberg gotenberg exploit attempt (CVE-2026-40281)
id: gg-pocmon-cve-2026-40281-9394922
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40281. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40281
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.40281
title: gotenberg gotenberg exploit attempt (CVE-2026-40281)
id: gg-pocmon-cve-2026-40281-9712220
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40281. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40281
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.40281