CVE-2026-40281: Gotenberg argument injection in metadata write endpoint

CVE-2026-40281 · Severity: critical · CVSS 10 · Published 2026-05-06

Gotenberg is a specialized tool used to convert various file formats into PDFs via a web API. A security flaw in its metadata processing allows an attacker to manipulate how files are saved within the system. By sending a specially crafted request, an unauthenticated user could move, rename, or overwrite critical system files, potentially leading to a complete service disruption or unauthorized system modifications.

Technologies: github.com/gotenberg/gotenberg/v7 (Go), github.com/gotenberg/gotenberg/v8 (Go), Gotenberg. Vendors: Go, Gotenberg.

Quick answers

Is CVE-2026-40281 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40281 being exploited in the wild.
How severe is CVE-2026-40281?
Critical severity, with a CVSS score of 10, published 6 May 2026.
Which products and versions are affected?
github.com/gotenberg/gotenberg/v7 (Go) SEMVER:introduced=0; github.com/gotenberg/gotenberg/v8 (Go) SEMVER:introduced=0,fixed=8.31.0; Gotenberg <= 8.30.1.
Is there a fix for CVE-2026-40281?
Yes. github.com/gotenberg/gotenberg/v8 (Go): upgrade to 8.31.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-40281 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-40281?
Check whether you run github.com/gotenberg/gotenberg/v7 (Go), github.com/gotenberg/gotenberg/v8 (Go) or Gotenberg at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/gotenberg/gotenberg/v8 (Go): upgrade to 8.31.0 or later
    go get github.com/gotenberg/gotenberg/v8@v8.31.0

Technical details

The vulnerability exists in the metadata write endpoint where metadata values are not properly sanitized before being passed to ExifTool via the go-exiftool library. While a previous fix (v8.30.1) implemented sanitization for metadata keys, it failed to sanitize metadata values. An attacker can inject a newline character (\n) into a metadata value, which causes the underlying line-based stdin protocol of ExifTool to interpret the subsequent data as new command-line arguments. This allows the injection of dangerous pseudo-tags such as -FileName, -Directory, -SymLink, and -HardLink. Exploitation can lead to arbitrary file overwrites or the creation of symlinks/hardlinks within the container. The issue is addressed in version 8.31.0.

Affected products

  • Gotenberg Gotenberg <= 8.30.1

Identifiers

  • CVE-2026-40281
  • GHSA-q7r4-hc83-hf2q
  • GO-2026-5572

Timeline

  • 2026-04-30: advisory: GitHub Security Advisory published
  • 2026-05-06: disclosed: CVE-2026-40281 published to NVD
  • 2026-05-11: patched: NVD analysis and CPE information updated

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.