Gotenberg ExifTool Metadata Write Blocklist Bypass Vulnerability
The ExifTool metadata write blocklist in Gotenberg v8 can be bypassed using ExifTool's group-prefix syntax, enabling arbitrary file rename, move, hardlink, and symlink creation on the server.
Gotenberg, a Docker-powered document conversion API, is vulnerable to a bypass in its ExifTool metadata write blocklist. This vulnerability, affecting Gotenberg v8 (<= 8.29.1), allows unauthenticated attackers to manipulate file system operations within the Gotenberg container. The vulnerability leverages ExifTool's group-prefix syntax to circumvent the intended restrictions on pseudo-tags like FileName, Directory, HardLink, and SymLink. This bypass is particularly critical as it directly negates the fix implemented for GHSA-qmwh-9m9c-h36m. The pre-auth nature of this vulnerability significantly broadens the attack surface, allowing malicious actors to potentially gain unauthorized access and control over file system resources.
Attack Chain
- The attacker sends a crafted HTTP request to the
/forms/pdfengines/metadata/writeendpoint. - The request includes a
metadatafield containing a JSON object with malicious ExifTool tags. - The attacker uses the group-prefix syntax (e.g.,
File:FileName) to bypass the tag blocklist inpkg/modules/exiftool/exiftool.go. - The
safeKeyPatternregex (^[a-zA-Z0-9\-_.:]+$) allows colons, so prefixed tag names pass validation. - The
SetNewValuefunction in ExifTool'sWriter.plstrips the prefix, allowing the malicious tag to be processed. - ExifTool executes the file system operation specified by the malicious tag (e.g., renaming, moving, creating symlinks).
- If the Gotenberg deployment uses mounted volumes or is non-containerized, the attacker can perform actions outside the container.
- The attacker achieves arbitrary file read via symlink chaining and file overwrite via directory manipulation.
Impact
The vulnerability allows pre-authenticated attackers to rename, move, or create links to files within the Gotenberg container. In deployments with mounted volumes or non-containerized setups, this can lead to arbitrary file read and overwrite via symlink chaining and directory manipulation. The vulnerability impacts Gotenberg v8 (<= 8.29.1) and can potentially compromise the confidentiality and integrity of data processed by the service. This is a direct bypass of a previous security fix, increasing the risk of exploitation.
Recommendation
- Upgrade Gotenberg to a version greater than 8.29.1 to remediate CVE-2026-42590.
- Implement input validation and sanitization on the
metadatafield of the/forms/pdfengines/metadata/writeendpoint to prevent exploitation of the ExifTool group-prefix bypass. - Deploy the Sigma rule
Detect Gotenberg ExifTool Metadata Write - File Renameto detect attempts to rename files using the vulnerable endpoint. - Monitor web server logs for requests to
/forms/pdfengines/metadata/writewithmetadatacontaining "File:FileName", "File:Directory", "File:HardLink", or "File:SymLink" to detect potential exploitation attempts.
Detection coverage 2
Detect Gotenberg ExifTool Metadata Write - File Rename
highDetects attempts to rename files via the Gotenberg ExifTool metadata write endpoint using the File:FileName parameter.
Detect Gotenberg ExifTool Metadata Write - Symlink Creation
highDetects attempts to create symlinks via the Gotenberg ExifTool metadata write endpoint using the File:SymLink parameter.
Detection queries are available on the platform. Get full rules →