# CVE-2026-40281: Gotenberg vulnerable to argument injection via newlines in ExifTool metadata values

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.26%, higher than 83% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-30T17:27:10.000Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-q7r4-hc83-hf2q, GO-2026-5572
- Weaknesses: CWE-88
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- gotenberg gotenberg: <= 8.30.1
- github.com/gotenberg/gotenberg/v8 (Go): before 8.31.0
- github.com/gotenberg/gotenberg/v7 (Go): all versions
- thecodingmachine gotenberg: before 8.31.0

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://github.com/gotenberg/gotenberg/security/advisories/GHSA-q7r4-hc83-hf2q> (exploit, advisory, patch, vendor-advisory, web)
- <https://github.com/gotenberg/gotenberg/commit/405f1069c026bb08f319fb5a44e5c67c33208318> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40281> (advisory)
- <https://github.com/gotenberg/gotenberg> (package)
- <https://github.com/gotenberg/gotenberg/releases/tag/v8.31.0> (web)

## Sources

- CVE List: [CVE-2026-40281](https://www.cve.org/CVERecord?id=CVE-2026-40281), CVE Terms of Use, modified 2026-05-07
- GitHub Advisory Database: [GHSA-q7r4-hc83-hf2q](https://github.com/advisories/GHSA-q7r4-hc83-hf2q), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5572](https://pkg.go.dev/vuln/GO-2026-5572), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40281](https://nvd.nist.gov/vuln/detail/CVE-2026-40281), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-40281 · Whole record: https://cve.day/CVE-2026-40281.json · Rebuilt by cve.day 2026-11-25T22:59:20.836Z
