# CVE-2026-42589: Gotenberg: Unauthenticated RCE via ExifTool Metadata Key Injection

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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): 3.17%, higher than 88% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-07T00:55:01.000Z
- Modified: 2026-11-24T17:15:05.659Z
- Also known as: GHSA-rqgh-gxv4-6657, GO-2026-5636
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gotenberg gotenberg: < 8.31.0
- github.com/gotenberg/gotenberg/v8 (Go): 8.29.1; before 8.31.0
- thecodingmachine gotenberg: before 8.31.0

## Every score

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

## References

- <https://github.com/gotenberg/gotenberg/security/advisories/GHSA-rqgh-gxv4-6657> (exploit, advisory, mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42589> (advisory)
- <https://github.com/gotenberg/gotenberg> (package)
- <https://github.com/gotenberg/gotenberg/releases/tag/v8.31.0> (web)

## Sources

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

---

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