-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The validator resolved the address. Its return type discarded it.\n\n`FilterOutboundURL` is the public entry point for URL filtering in `pkg/gotenberg/outbound.go`. The exported signature is intentional: one URL goes in, one error comes out. The implementation, in pre-patch 8.31.0 (the version CVE-2026-42592 names as affected):\n\n```go\nfunc FilterOutboundURL(ctx context.Context, rawURL string, allowList, denyList []*regexp2.Regexp, deadline time.Time) error {\n\t_, err := decideOutbound(ctx, rawURL, allowList, denyList, deadline)\n\treturn err\n}\n```\n\nThe first return value of `decideOutbound` is named, typed, and discarded by the underscore. Reading two type definitions up in the same file:\n\n```go\ntype outboundDecision struct {\n\tbypass bool\n\t// pinned holds the IPs resolved by [ResolveAndCheckPublic] for the URL\n\t// host. The dial should be pinned to one of these to prevent DNS\n\t// rebinding between validation and connect.\n\tpinned []netip.Addr\n}\n```\n\nThe struct's own godoc names the threat. `pinned` exists for the explicit purpose of preventing DNS rebinding between validation and connect. The field is populated. `decideOutbound` resolves the host with `outboundResolver.LookupNetIP`, walks each returned `netip.Addr` against `IsPublicIP`, and returns the addresses in the `pinned` slice when every one of them passes:\n\n```go\naddrs, err := ResolveAndCheckPublic(ctx, host)\nif err != nil {\n\tif errors.Is(err, ErrNonPublicIP) {\n\t\treturn outboundDecision{}, fmt.Errorf(\"'%s' targets a non-public address: %w\", normalized, ErrFiltered)\n\t}\n\treturn outboundDecision{}, fmt.Errorf(\"validate '%s' host: %w\", normalized, err)\n}\n\nreturn outboundDecision{pinned: addrs}, nil\n```\n\nThe address was resolved. The address passed the public-IP check. The address was packaged into the struct the package author wrote for the explicit purpose of preventing rebinding. `FilterOutboundURL` then unpacked the struct, dropped the addresses on the floor, and returned `nil`.\n\nThe Go HTTP client path in the same file consumes the addresses correctly. `outboundRoundTripper.RoundTrip` calls `decideOutbound` directly, stashes the `outboundDecision` in `req.Context()` under a private key, and the dialer it wraps reads the decision back out and calls `dialPinned` against the stashed IPs. Inside that pipeline, the pinning is real. CVE-2026-42592 is for the two callers that do not use it.\n\n## The second gate did the same thing.\n\nWhen Gotenberg renders a URL to PDF via Chromium, the entry point in `pkg/modules/chromium/browser.go` filters the main URL once:\n\n```go\nerr := gotenberg.FilterOutboundURL(ctx, url, b.arguments.allowList, b.arguments.denyList, deadline)\nif err != nil {\n\treturn fmt.Errorf(\"filter URL: %w\", err)\n}\n```\n\nThat is the first validator. The addresses it resolved are gone. The string URL is then handed to Chromium, which begins navigation.\n\nChromium emits `Fetch.requestPaused` events for the navigation request and every sub-resource. Gotenberg's CDP intercept, in `pkg/modules/chromium/events.go`, is the second validator:\n\n```go\nerr := gotenberg.FilterOutboundURL(ctx, e.Request.URL, options.allowList, options.denyList, deadline)\nif err != nil {\n\tlogger.WarnContext(ctx, err.Error())\n\tallow = false\n}\n\n// ... allowed-file-prefix check elided ...\n\nif !allow {\n\treq := fetch.FailRequest(e.RequestID, network.ErrorReasonAccessDenied)\n\terr = req.Do(executorCtx)\n\t// ...\n\treturn\n}\n\nreq := fetch.ContinueRequest(e.RequestID)\n```\n\nThe intercept exists because the package author already understood that Chromium would dial outside Gotenberg's control. It runs the same filter against the same URL string. It produces the same yes-or-no. The yes-or-no goes back to Chromium as `fetch.ContinueRequest`. The addresses, again, do not.\n\nTwo gates inside Gotenberg's Go process. Two DNS resolutions. Zero addresses survive to where Chromium dials.\n\n## Three DNS resolutions for one request.\n\nWhat the attacker sends is a public HTTPS endpoint they control. The route is `POST /forms/chromium/convert/url` with `url=https://rebind.attacker.example/`. The attacker's authoritative DNS for `rebind.attacker.example` is configured with a TTL of one second and rotates between two A records: a public IP they own, and `169.254.169.254` (or `10.0.0.1`, or whatever internal service the attacker has reason to believe is reachable from Gotenberg's network namespace).\n\nThree resolutions happen in the request's lifetime, none of them sharing an answer:\n\n1. **Gotenberg's main filter.** `chromiumBrowser.do` calls `FilterOutboundURL`. `ResolveAndCheckPublic` runs through `net.DefaultResolver.LookupNetIP`. The attacker's DNS returns the public IP. `IsPublicIP` returns true. `FilterOutboundURL` returns `nil`. The resolved address goes nowhere.\n\n2. **Gotenberg's CDP intercept.** Chromium begins navigation; `Fetch.requestPaused` fires; the handler calls `FilterOutboundURL` again. The Go resolver queries again. TTL is one second; the attacker's DNS returns whatever it likes. The attacker is not racing this lookup. The attacker is racing Chromium's TCP connect.\n\n3. **Chromium's TCP connect.** The handler called `fetch.ContinueRequest`. Chromium has no `--host-resolver-rules` and no `--proxy-server`. It performs its own DNS lookup through its built-in `HostResolver`. The attacker's DNS, caching nothing of Gotenberg's prior queries because the attacker's DNS is the source of truth and TTL is one second, returns the private IP. Chromium opens a TCP connection to the private address. The internal service responds. Chromium renders the response. Gotenberg returns the rendered PDF to the unauthenticated caller.\n\nThe CVE description names the third hop as a \"timing window.\" It is not a window in the TOCTOU sense. The attacker did not race anyone; the attacker's DNS server returned a different answer to a different query at a different time, each query a deterministic event the attacker scheduled. Three queries, three answers, no contract between them. The attacker did not need microseconds. The attacker needed one second.\n\n## The patch is not a fifth string parser.\n\nThe four prior Gotenberg exhibits in this pattern were all patched in the same shape: identify the canonicalization the next layer would perform, run it earlier in the validator. [CVE-2026-40280](/posts/gotenberg-cve-2026-40280-named-fix-adds-the-bug)'s patch added `strings.ToLower(parsed.Scheme)` before the regex. [CVE-2026-42596](/posts/gotenberg-cve-2026-42596-patch-removed-the-default-protection)'s patch removed the case-class deny-list entirely. [CVE-2026-40893](/posts/gotenberg-cve-2026-40893-blocklist-asked-exiftool-nothing)'s patch added a `strings.LastIndex(key, \":\")` group-prefix strip before `EqualFold`. [CVE-2026-42590](/posts/gotenberg-cve-2026-42590-denylist-was-map-delete)'s patch swapped a literal-key map delete for an `EqualFold` walk. Each patch made the gate canonicalize the way the action canonicalizes. The action lived in the same process; the canonicalization could be reproduced.\n\nThe CVE-2026-42592 patch does not reproduce Chromium's DNS. It cannot. Chromium's resolver is in another process, and the attacker controls the resolver's input. There is no canonicalization Gotenberg can run that will produce the answer Chromium will get when Chromium asks DNS one second from now.\n\nThe 8.32.0 patch (`35f1a99`, `fix(chromium): harden outbound URL handling`) adds 324 lines of `pkg/modules/chromium/pinning_proxy.go`. The proxy is a loopback-bound HTTP/1.1 forward-and-CONNECT proxy:\n\n```go\ntype pinningProxy struct {\n\tallowList []*regexp2.Regexp\n\tdenyList []*regexp2.Regexp\n\n\tdecide func(ctx context.Context, rawURL string, allowList, denyList []*regexp2.Regexp, deadline time.Time) (gotenberg.OutboundDecision, error)\n\tdialPinned func(ctx context.Context, network string, addrs []netip.Addr, port string) (net.Conn, error)\n\tdialBypass func(ctx context.Context, network, addr string) (net.Conn, error)\n\t// ...\n}\n```\n\n`browser.Start` binds the proxy to an ephemeral 127.0.0.1 port and passes the address to Chromium via `chromedp.ProxyServer(b.pinningProxy.URL())`. Chromium's outbound stack is now configured to send every request to `http://127.0.0.1:`. Chromium's built-in `HostResolver` never runs for the navigation host or any sub-resource host. For HTTPS, Chromium issues `CONNECT example.com:443` to the proxy:\n\n```go\ndecision, err := p.decide(req.Context(), \"https://\"+req.Host, p.allowList, p.denyList, deadline)\nif err != nil {\n\t// ... 403 ...\n}\n\nvar upstream net.Conn\nswitch {\ncase decision.Bypass:\n\tupstream, err = p.dialBypass(req.Context(), \"tcp\", req.Host)\ncase len(decision.Pinned) > 0:\n\tupstream, err = p.dialPinned(req.Context(), \"tcp\", decision.Pinned, port)\ndefault:\n\terr = errors.New(\"no pinned addresses and not bypassed\")\n}\n```\n\nThe proxy calls the renamed-and-exported `gotenberg.DecideOutbound` (rather than the lossy `FilterOutboundURL`), keeps `OutboundDecision.Pinned`, hijacks the client socket, splices the bytes both directions, and lets Chromium negotiate TLS to the original hostname end-to-end. The package comment names the move directly: *\"Routing Chromium through this proxy eliminates the Chromium-side DNS lookup that otherwise opens a DNS rebinding window between Gotenberg's validation and Chromium's TCP connect.\"*\n\nThe fix is the elimination of a resolver. `FilterOutboundURL` still resolves DNS twice per request and still discards the addresses both times. The patch's behavioral diff in `outbound.go` is a new `WithAllowPrivateIPs` option that lets the dangerous-by-default modules opt out of the public-IP check; the underscore on the return value of `decideOutbound` inside `FilterOutboundURL` is preserved verbatim. The fix is structural rather than corrective: a third gate Chromium cannot route around, doing the only DNS resolution that reaches the wire.\n\n## Fifth Gotenberg exhibit. One design.\n\n`gate-before-canonicalize` is the pattern Gotenberg's outbound URL filter keeps exhibiting. The first four exhibits showed the pattern's shape across textual canonicalization: URL scheme case ([CVE-2026-40280](/posts/gotenberg-cve-2026-40280-named-fix-adds-the-bug)), URL host IPv6 unmapping ([CVE-2026-42596](/posts/gotenberg-cve-2026-42596-patch-removed-the-default-protection)), ExifTool tag-name group prefix ([CVE-2026-40893](/posts/gotenberg-cve-2026-40893-blocklist-asked-exiftool-nothing)), ExifTool tag-name case folding ([CVE-2026-42590](/posts/gotenberg-cve-2026-42590-denylist-was-map-delete)). CVE-2026-42592 shows the pattern's shape across DNS resolution, where the \"canonicalization\" is the network's resolver and the resolver runs separately for the gate and the action because the gate and the action live in separate processes.\n\nThe Gotenberg outbound URL filter is also a design-debt driver. The component is `pkg/gotenberg/outbound.go` plus the Chromium intercept that calls into it. The bug class is \"the filter and the action disagree about what the URL points at.\" Each of the five patches closed one local axis. The component continues to ship a `FilterOutboundURL` whose return type is `error`. Anywhere in the codebase that calls it without going through `outboundRoundTripper`'s context-stashed pinning loses the resolved addresses. The pinning proxy is a clever workaround for the Chromium caller; the API surface that produced the workaround is still in the package, and the next CVE in this driver will be the next caller that calls `FilterOutboundURL` directly.\n\nAdvisory: [GHSA-2pmr-289p-44r3](https://github.com/gotenberg/gotenberg/security/advisories/GHSA-2pmr-289p-44r3). Patch: commit `35f1a99`. Fixed in 8.32.0.","closing_line":"`FilterOutboundURL` still throws the address away. The pinning proxy makes that not matter.","hook_md":"CVE-2026-42592 is the fifth Gotenberg outbound-URL-filter bypass disclosed in three months. The prior four lived inside Gotenberg's own process. The fifth lives outside it. The gate runs in Go; the dial runs in Chromium. Between them, two independent DNS resolvers ask the same hostname and get different answers. Gotenberg's filter resolved the address that would have bound them. Its return type was `error`. The address did not survive the return statement.","post_id":432,"slug":"gotenberg-cve-2026-42592-filter-threw-the-address-away","title":"CVE-2026-42592: Gotenberg's FilterOutboundURL Resolved the Address. Its Return Type Threw It Away.","type":"initial","unreadable_sentence":"Gotenberg's filter resolved the address. Its return type was `error`. The address did not survive the return statement."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCawD8DQAKCRDeZjl4jgkQ JvkhAP9Jw8zYVeoYaFKGDAHtcjhjHjYR6R93GuOpkHSpe8l9pwD+OEljLXrnT6Ll cpopImixHuHITI0eG9BrjjMecSi1pgI= =Ucd2 -----END PGP SIGNATURE-----