-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## What 8.32.0 actually changes\n\nThe patched release is `gotenberg/v8.32.0`, tagged April 30. The commit that closes CVE-2026-42596 is `7a914fc`, with the subject line *fix(outbound)!: per-module deny-private-ips and deny-public-ips, permissive defaults*. The trailing `!` is the conventional-commits breaking-change marker. The clause after the comma is the description.\n\nFor `--api-download-from-deny-list`, the diff is the default value:\n\n```diff\n-fs.StringSlice(\"api-download-from-deny-list\",\n- []string{`^https?://(10\\.|172\\.(1[6-9]|2[0-9]|3[01])\\.|192\\.168\\.|169\\.254\\.|0\\.0\\.0\\.0|127\\.|localhost|\\[::1\\]|\\[fd)`},\n- \"Set the denied URLs for the download from feature using regular expressions ...\")\n+fs.StringSlice(\"api-download-from-deny-list\", []string{},\n+ \"Set the denied URLs for the download from feature using regular expressions ...\")\n+fs.Bool(\"api-download-from-deny-private-ips\", false,\n+ \"Reject downloadFrom URLs whose host resolves to a non-public IP address (loopback, RFC1918, link-local, unique-local). Enable on deployments that accept untrusted downloadFrom sources to mitigate SSRF against internal services\")\n+fs.Bool(\"api-download-from-deny-public-ips\", false,\n+ \"Reject downloadFrom URLs whose host resolves to a public IP address. Enable on air-gapped or data-governed deployments to prevent downloads from reaching the public internet\")\n```\n\nThe identical edit lands in `pkg/modules/webhook/webhook.go` for `--webhook-deny-list`. The chromium module follows the same shape with one extra step: the previous `--chromium-allow-private-ips` boolean is renamed to `--chromium-deny-private-ips`, the polarity of the value flips, and the default for the new flag is `false`. There is no `MarkDeprecated` entry for the old name. An operator's existing `--chromium-allow-private-ips=false` flag (which meant \"deny private IPs\") is gone in 8.32.0 and replaced, by default, with `--chromium-deny-private-ips=false` (which means \"do not deny private IPs\").\n\nThe post-patch default behavior, with no command-line flags supplied, is the following:\n\n1. The download-from deny-list contains zero patterns.\n2. The webhook deny-list contains zero patterns.\n3. `--api-download-from-deny-private-ips` and `--webhook-deny-private-ips` are false.\n4. `--api-download-from-deny-public-ips` and `--webhook-deny-public-ips` are false.\n5. `--chromium-deny-private-ips` and `--chromium-deny-public-ips` are false.\n\nA Gotenberg 8.32.0 container started with `docker run gotenberg/gotenberg:8` will dial `http://127.0.0.1/`, `http://[::1]/`, `http://[::ffff:127.0.0.1]/`, and any RFC1918 destination, on a `downloadFrom` request, on a webhook callback, and on a Chromium sub-resource fetch.\n\n## The integration test asserts the new default\n\n`7a914fc` modifies `test/integration/features/chromium_convert_url.feature`. The pre-patch scenario read:\n\n```diff\n- Scenario: POST /forms/chromium/convert/url (Main URL resolves to a non-public IP, allow-private-ips off)\n+ Scenario: POST /forms/chromium/convert/url (Main URL resolves to a non-public IP, permissive default)\n Given I have a Gotenberg container with the following environment variable(s):\n | CHROMIUM_ALLOW_LIST | |\n Given I have a static server\n+ When I make a \"POST\" request to Gotenberg at the \"/forms/chromium/convert/url\" endpoint with the following form data and header(s):\n+ | url | http://host.docker.internal:%d/html/testdata/page-1-html/index.html | field |\n+ Then the response status code should be 200\n+ Then the response header \"Content-Type\" should be \"application/pdf\"\n+ Then there should be 1 PDF(s) in the response\n+\n+ Scenario: POST /forms/chromium/convert/url (Main URL resolves to a non-public IP, deny-private-ips on)\n+ Given I have a Gotenberg container with the following environment variable(s):\n+ | CHROMIUM_ALLOW_LIST | |\n+ | CHROMIUM_DENY_PRIVATE_IPS | true |\n+ Given I have a static server\n When I make a \"POST\" request to Gotenberg at the \"/forms/chromium/convert/url\" endpoint with the following form data and header(s):\n | url | http://host.docker.internal:%d/html/testdata/page-1-html/index.html | field |\n Then the response status code should be 403\n```\n\nSame URL. Same target. Same `host.docker.internal:` resolving to a non-public address. The pre-patch test asserted 403 Forbidden. The post-patch test asserts 200 with a PDF in the response. The 403 case still exists in the test file, gated behind the new `CHROMIUM_DENY_PRIVATE_IPS=true` environment variable. The default scenario was rewritten to assert success.\n\nThe integration test is testimony. The maintainer signed off on the new default behavior in the same commit that removed the protection that used to enforce it.\n\n## The bypass the CVE points at was already blocked in 8.31.0\n\nThe GHSA-4vmc-gm8v-m35h advisory marks `<= 8.30.1` as affected. The 8.31.0 release, tagged April 16 (two weeks before 8.32.0), added a new module `pkg/gotenberg/outbound.go` whose `decideOutbound` function ran on every outbound URL. The function, before applying any regex, lowercased the scheme and host. After the regex check, it resolved the host and tested every returned address against `IsPublicIP`:\n\n```go\n// pkg/gotenberg/outbound.go, v8.31.0\nfunc IsPublicIP(addr netip.Addr) bool {\n if !addr.IsValid() {\n return false\n }\n addr = addr.Unmap()\n switch {\n case addr.IsLoopback(),\n addr.IsPrivate(),\n addr.IsLinkLocalUnicast(),\n addr.IsLinkLocalMulticast(),\n addr.IsMulticast(),\n addr.IsUnspecified(),\n addr.IsInterfaceLocalMulticast():\n return false\n }\n return true\n}\n```\n\nWalk the advisory's bypass URL through that code. The URL is `http://[::ffff:127.0.0.1]:18081/page_1.pdf`. The regex sees the lowercased form and does not match (`::ffff:` is not in any character class). The handler does not stop there. `ResolveAndCheckPublic` calls `netip.ParseAddr(\"::ffff:127.0.0.1\")`, which returns a valid IPv4-mapped IPv6 address. `IsPublicIP` calls `addr.Unmap()`, which returns the embedded IPv4 `127.0.0.1`. `addr.IsLoopback()` returns true. The function returns false. `ResolveAndCheckPublic` rejects with `ErrNonPublicIP`. The dial does not happen.\n\nThe advisory's PoC URL did not bypass 8.31.0 default config. The fix that closed it is `924576d` (\"fix(outboundURLs): better detaults\"), shipped in 8.31.0 and traced in [our prior post on CVE-2026-40280](/posts/gotenberg-cve-2026-40280-named-fix-adds-the-bug). The 8.32.0 patch that the GHSA references as the fix for CVE-2026-42596 does not add a new defense against `[::ffff:127.0.0.1]`. It removes the broken regex layer that drew the CVE and pushes the layer that already caught the bypass behind a default-false flag.\n\n## The opt-in IP-class check is also incomplete\n\nThe check that the 8.32.0 flags opt operators into is `IsPublicIP`. The function's rejection list covers loopback, RFC1918, IPv4 link-local, multicast, unspecified, IPv6 unique-local, and IPv4-mapped IPv6 (via `Unmap`). It does not cover IPv6 prefixes that the standard library's `netip.Addr.IsPrivate` does not classify but that tunnel or translate to an embedded IPv4 destination.\n\nOn May 12, twelve days after 8.32.0 was tagged, the same author committed `f9a01c9`, \"fix(gotenberg): block IPv6 prefixes that tunnel to internal IPv4 in IsPublicIP\". The commit adds eight prefixes by hand:\n\n```go\n// pkg/gotenberg/outbound.go, post-f9a01c9 main\nvar nonPublicIPv6Prefixes = []netip.Prefix{\n netip.MustParsePrefix(\"2002::/16\"), // 6to4: bits 16-47 embed an IPv4 destination\n netip.MustParsePrefix(\"2001::/32\"), // Teredo: bits 96-127 embed an IPv4 destination\n netip.MustParsePrefix(\"64:ff9b::/96\"), // NAT64 well-known: low 32 bits embed IPv4\n netip.MustParsePrefix(\"64:ff9b:1::/48\"), // NAT64 local-use\n netip.MustParsePrefix(\"fec0::/10\"), // deprecated site-local\n netip.MustParsePrefix(\"::/96\"), // IPv4-compatible (deprecated)\n netip.MustParsePrefix(\"2001:db8::/32\"), // documentation\n netip.MustParsePrefix(\"100::/64\"), // discard prefix\n}\n```\n\nA 6to4-encoded form of `127.0.0.1` is `2002::7f00:1`. In 8.32.0 with `--api-download-from-deny-private-ips=true`, the host parses as a valid IPv6 address, `Unmap` does not convert it (it is not an IPv4-mapped IPv6), `IsPrivate` returns false (the address is not in `fc00::/7`), and `IsPublicIP` returns true. The dial proceeds. The 8.32.0 release that names IP-class rejection as the protection layer ships with the check still leaking through the IPv6 prefixes that exist specifically to carry IPv4 destinations across IPv6 transport.\n\n`f9a01c9` is not in any tag as of writing. The next Gotenberg release will carry it. Operators who opt into `--api-download-from-deny-private-ips=true` on 8.32.0 inherit a check that misses 6to4, Teredo, NAT64, and five other IPv6 ranges, none of which appear in the standard library's privacy classifiers and all of which were added to the in-tree list one commit at a time.\n\n## Two CVEs against the same regex layer\n\nCVE-2026-40280 (May) was filed against the case-sensitivity bug in the regex deny-list. Its PoC was `HTTP://169.254.169.254/latest/meta-data/...`, a case-variant of the regex pattern. The advisory pointed at commit `3f01ca1`, the commit that added the regex default. [Our prior post traces the actual fix](/posts/gotenberg-cve-2026-40280-named-fix-adds-the-bug) to `924576d`, which ships alongside `3f01ca1` in 8.31.0 and introduces `decideOutbound` and `IsPublicIP`.\n\nCVE-2026-42596 is the same regex layer observed through a different bypass. The case-variant attack matched the regex's lowercase character classes only after Go's URL parser lowercased the input. The IPv4-mapped IPv6 attack does not match the regex at all because `[::ffff:` is not in any of its character classes. Both attacks reach the dial because the regex inspects the wrapped representation and the dial uses the unwrapped one. This is the `gate-before-canonicalize` pattern observed on the URL scheme and on the URL host respectively, in the same regex, against the same module, in the same product.\n\nThe 8.31.0 fix closed both attacks structurally by adding an IP-resolution check that runs after the parser canonicalizes. The 8.32.0 fix takes the opposite direction. It removes the regex defaults that drew the second CVE and pushes the IP-resolution check behind a default-false flag. The change is documented in the commit subject as \"permissive defaults\" and the integration test was rewritten to assert the new permissive behavior. The advisory's own recommended-fix list, item three, reads \"reconsider default enablement of outbound features.\" The maintainer adopted item three. The post-patch default is that the outbound features are enabled and the SSRF guard is off.\n\nThe design-debt driver here is the deny-list-as-URL-text-regex. The driver has produced four Gotenberg SSRF CVEs in two years, the prior post enumerates the first three and this one is the fourth. Each of the first three patches adjusted a string-pattern check. The fourth removes the string-pattern check entirely, replaces it with a structurally correct IP-resolution check, and ships the IP-resolution check off.\n\nPoC and references: advisory [GHSA-4vmc-gm8v-m35h](https://github.com/advisories/GHSA-4vmc-gm8v-m35h); commits [`7a914fc`](https://github.com/gotenberg/gotenberg/commit/7a914fc) and [`f9a01c9`](https://github.com/gotenberg/gotenberg/commit/f9a01c9) in [gotenberg/gotenberg](https://github.com/gotenberg/gotenberg).","closing_line":"The check that closes the advisory's named bypass is now a flag. The flag is off by default. The replacement layer the flag turns on still leaks IPv6 prefixes that a commit twelve days after the release will fix in some future tag.","hook_md":"The advisory for CVE-2026-42596 names the default deny-list as the bug. The proof-of-concept URL is `http://[::ffff:127.0.0.1]:18081/page_1.pdf`, an IPv4-mapped IPv6 form that does not appear in any character class of `^https?://(10\\.|172\\.(1[6-9]|2[0-9]|3[01])\\.|192\\.168\\.|169\\.254\\.|0\\.0\\.0\\.0|127\\.|localhost|\\[::1\\]|\\[fd)`. The 8.32.0 patch agrees with the advisory that the default deny-list is the bug. It removes the default deny-list.","post_id":348,"slug":"gotenberg-cve-2026-42596-patch-removed-the-default-protection","title":"CVE-2026-42596: Gotenberg's Fix for the Default Deny-List Bypass Removed the Default Deny-List","type":"initial","unreadable_sentence":"The patch for the default-deny-list bypass removed the default deny-list."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCavu1hQAKCRDeZjl4jgkQ JkBTAQDIMXOggWH+3vmVz5QxRTc0Lw4GVy2cGaJMg9tPpGk6OwD/ZxTefpR1pDIA z8fbFCpBVXpKRXQdP+hqGmi6e5vWIAI= =jZRP -----END PGP SIGNATURE-----