The v8.29.0 ExifTool denylist in Gotenberg was four lines: a slice with two tag names, a for loop, and delete(metadata, tag). ExifTool has five filesystem-side-effect pseudo-tags. The slice named two. The delete was case-sensitive; ExifTool's tag matcher is not. CVE-2026-42590 is the bypass each of those two facts produces.
CVE-2026-42590: Gotenberg's ExifTool Denylist Was Two Names and a Map Delete. ExifTool Reads Tag Names in Any Case.
vendor
patterns
cve
proof of concept
The denylist was two names and a delete
The vulnerable function is WriteMetadata in pkg/modules/exiftool/exiftool.go. The route is POST /forms/pdfengines/metadata/write. A multipart form arrives with a PDF file part and a metadata field whose value is a JSON object. FormDataPdfMetadata (pkg/modules/pdfengines/routes.go:107) unmarshals the JSON into a map[string]any and hands it down to WriteMetadataStub, which hands it to engine.WriteMetadata. Inside WriteMetadata, the defense is this:
// Filter user-supplied metadata to prevent ExifTool pseudo-tags from
// triggering dangerous side effects like file renames or moves.
// See https://exiftool.org/TagNames/Extra.html.
dangerousTags := []string{
"FileName", // Writing this triggers a file rename in ExifTool
"Directory", // Writing this triggers a file move in ExifTool
}
for _, tag := range dangerousTags {
delete(metadata, tag)
}The comment links to ExifTool's pseudo-tag reference. The same reference page also lists HardLink ("create a hard link to a copy of the file"), SymLink ("create a symbolic link to the file"), and FilePermissions ("set the file permissions"). The author cited the page, picked two entries, and stopped.
The second weakness is the operation. delete(metadata, "FileName") removes the entry whose key is the literal byte sequence F-i-l-e-N-a-m-e. A submission with key filename survives unchanged into the argv loop. ExifTool then processes tag names case-insensitively, resolves filename to the canonical FileName pseudo-tag, and renames the working file.
The bypasses available against v8.29.0 are the cross product. Two missing entries (HardLink, SymLink) bypass the list dimension. Any non-canonical casing of FileName or Directory (filename, directory, FILENAME) bypasses the case dimension. The map delete sees neither.
What reaches the argv
A v8.29.0 instance reachable on port 3000 turns this request into a hard link from /srv/gotenberg-uploads/<uuid>.pdf to a path the caller chooses:
curl -X POST http://gotenberg:3000/forms/pdfengines/metadata/write \
-F "[email protected]" \
-F 'metadata={"HardLink":"/srv/data/poisoned.pdf"}'HardLink is not in the v8.29.0 slice, so it never reaches the delete loop. The follow-on loop in WriteMetadata iterates metadata and appends -HardLink=/srv/data/poisoned.pdf to the argv. The actual exec is:
exiftool -overwrite_original -HardLink=/srv/data/poisoned.pdf /srv/gotenberg-uploads/<uuid>.pdfExifTool's HardLink pseudo-tag invokes link(2) from the working file to the attacker-supplied path. The destination's parent directory needs to be writable by the gotenberg process, but the destination's name and full path are the attacker's. SymLink is the same primitive against symlink(2). FilePermissions is chmod(2) on the working file with attacker-chosen bits. None of the three were on the v8.29.0 list.
The case-fold variant of the file-rename bypass:
curl -X POST http://gotenberg:3000/forms/pdfengines/metadata/write \
-F "[email protected]" \
-F 'metadata={"filename":"owned.pdf"}'delete(metadata, "FileName") does not match the key "filename". The argv becomes -filename=owned.pdf. ExifTool's Image::ExifTool::DoSetTag lowercases the tag name during lookup, resolves it to FileName, and renames the working file in its parent directory. Gotenberg is a stateless Docker API; the working file lives in a per-request temp directory the process owns. The rename happens there, the downstream pipeline misses the file at its expected name, and the request returns an error. The rename has already occurred.
The v8.30.0 patch and what it does not say
Commit 15050a3, titled "fix(exiftool): case-insensitive comparison and expanded blocklist," is the named fix for CVE-2026-42590. It ships in v8.30.0 on April 5, 2026. The diff:
+// Filter user-supplied metadata to prevent ExifTool pseudo-tags from
+// triggering dangerous side effects like file renames, moves, or link
+// creation. Comparison is case-insensitive because ExifTool processes
+// tag names case-insensitively.
+// See https://exiftool.org/TagNames/Extra.html.
dangerousTags := []string{
"FileName", // Writing this triggers a file rename in ExifTool
"Directory", // Writing this triggers a file move in ExifTool
+ "HardLink", // Writing this creates a hard link in ExifTool
+ "SymLink", // Writing this creates a symbolic link in ExifTool
}
-for _, tag := range dangerousTags {
- delete(metadata, tag)
+for key := range metadata {
+ for _, tag := range dangerousTags {
+ if strings.EqualFold(key, tag) {
+ delete(metadata, key)
+ }
+ }
}Two new tag names. One comparison upgrade. The strings.EqualFold closes the case-sensitivity bypass. HardLink and SymLink close the missing-entries bypass. The patch reads as the defense the v8.29.0 function should have been.
The comment the patch adds is the sentence the post turns on. "Comparison is case-insensitive because ExifTool processes tag names case-insensitively." The developer learned a specific fact about ExifTool's tag matcher and added an EqualFold to handle the axis the fact describes. The comment is testimony: it names exactly one of the dimensions on which the two parsers disagree. There are at least three more.
The fix the patch does not include: ExifTool's group-prefix syntax. ExifTool accepts File:FileName, System:Directory, and a:HardLink as group-prefixed forms of the same pseudo-tags. The prefix is stripped by SetNewValue in Writer.pl before tag matching, so all forms resolve to the same operation. strings.EqualFold("File:FileName", "FileName") returns false because the comparison runs over the literal string. The prefixed forms survive the v8.30.0 denylist intact, reach the argv as -File:FileName=evil.pdf, and ExifTool renames the file.
That bypass is filed as CVE-2026-40893 and patched in v8.32.0 by commit 68e0f88, which adds strings.LastIndex(key, ":") to strip the prefix before EqualFold runs. FilePermissions is added to the dangerous-tag list separately in v8.31.0 (commit 46e1909). The patch you are reading here closes two of the function's canonicalization axes and leaves the third in code for another twenty-five days.
The component is the bug class
The dangerousTags slice and its loop are a design-debt driver. The denylist for ExifTool pseudo-tags in Gotenberg has been re-patched three times in the same month on the same handful of lines:
| Version | Date | What the patch added |
|---|---|---|
| v8.30.0 | 2026-04-05 | Case-insensitive EqualFold; HardLink and SymLink added to the list. (CVE-2026-42590.) |
| v8.31.0 | 2026-04-16 | FilePermissions added to the list. |
| v8.32.0 | 2026-04-30 | strings.LastIndex(key, ":") strips group prefixes before EqualFold. (CVE-2026-40893.) |
The shape is the same every time. ExifTool's tag matcher is the canonicalizer. It accepts case variants, group-prefixed variants, IFD-syntax variants, and a documented set of pseudo-tag names, and resolves all of them to the same write operation. Gotenberg's denylist is implemented against the string the caller submitted. The action is implemented against the canonical name ExifTool resolved to. Each fix closes one axis of disagreement between the two parsers and leaves the rest. The next round of the iteration finds the next axis.
The pattern is gate-before-canonicalize. Prior Gotenberg exhibits of the same pattern lived in URL parsing: CVE-2026-40280 on URL scheme (HTTPS:// clearing a case-sensitive ^https? byte-match before net/url.Parse lowercased it for the dial), and CVE-2026-42596 on URL host ([::ffff:127.0.0.1] evading a deny-list character class before net/netip.ParseAddr unmapped it to the loopback IPv4). This exhibit moves the same disease one organ over, from network to filesystem, and shows the pattern in its smallest possible form. The gate is delete(map, "FileName"). The canonicalizer is Image::ExifTool::DoSetTag. There are no middleware layers between them, no proxies, no two-machine handoffs. Two lines of Go and one Perl function. The disagreement still buys an arbitrary-path hard link.
The structural fix for the bug class is to canonicalize the user-supplied key against ExifTool's resolution rules before checking it against the denylist (or, equivalently, to ask ExifTool what canonical tag the key resolves to and check that). None of the three Gotenberg patches does this. v8.30.0 adds two strings and one helper. v8.31.0 adds another string. v8.32.0 adds another strings call. ExifTool's resolution rules have more axes than this strategy will reach.
PoC: GHSA-7v3r-m9c8-r855
The denylist has been re-patched three times. The strategy has not changed.