Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/gotenberg/gotenberg/v8
  4. ›
  5. CVE-2026-40281

CVE-2026-40281: Gotenberg has ExifTool stdin argument injection via metadata value newlines (bypass of key sanitization fix)

April 30, 2026 (updated May 8, 2026)

The metadata write endpoint in v8.30.1 validates metadata keys for control characters (commit 405f106) but leaves metadata values unsanitized. go-exiftool’s WriteMetadata sends each key/value pair to ExifTool’s stdin as:

fmt.Fprintln(e.stdin, "-"+k+"="+str)

A \n character in str splits this into two separate stdin lines, injecting an arbitrary ExifTool pseudo-tag argument. The attacker controls what comes after the newline, enabling injection of -FileName, -Directory, -SymLink, -HardLink, and other dangerous pseudo-tags — the exact tags the key blocklist was designed to prevent.

References

  • github.com/advisories/GHSA-q7r4-hc83-hf2q
  • github.com/gotenberg/gotenberg/commit/405f1069c026bb08f319fb5a44e5c67c33208318
  • github.com/gotenberg/gotenberg/releases/tag/v8.31.0
  • github.com/gotenberg/gotenberg/security/advisories/GHSA-q7r4-hc83-hf2q
  • nvd.nist.gov/vuln/detail/CVE-2026-40281

Code Behaviors & Features

Detect and mitigate CVE-2026-40281 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.31.0

Fixed versions

  • 8.31.0

Solution

Upgrade to version 8.31.0 or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

go/github.com/gotenberg/gotenberg/v8/CVE-2026-40281.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 17 May 2026 12:23:57 +0000.