//nefariousplan

CVE-2026-42592: Gotenberg's FilterOutboundURL Resolved the Address. Its Return Type Threw It Away.

vendor

patterns

cve

proof of concept

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.

The validator resolved the address. Its return type discarded it.

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):

func FilterOutboundURL(ctx context.Context, rawURL string, allowList, denyList []*regexp2.Regexp, deadline time.Time) error {
	_, err := decideOutbound(ctx, rawURL, allowList, denyList, deadline)
	return err
}

The first return value of decideOutbound is named, typed, and discarded by the underscore. Reading two type definitions up in the same file:

type outboundDecision struct {
	bypass bool
	// pinned holds the IPs resolved by [ResolveAndCheckPublic] for the URL
	// host. The dial should be pinned to one of these to prevent DNS
	// rebinding between validation and connect.
	pinned []netip.Addr
}

The 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:

addrs, err := ResolveAndCheckPublic(ctx, host)
if err != nil {
	if errors.Is(err, ErrNonPublicIP) {
		return outboundDecision{}, fmt.Errorf("'%s' targets a non-public address: %w", normalized, ErrFiltered)
	}
	return outboundDecision{}, fmt.Errorf("validate '%s' host: %w", normalized, err)
}

return outboundDecision{pinned: addrs}, nil

The 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.

The 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.

The second gate did the same thing.

When Gotenberg renders a URL to PDF via Chromium, the entry point in pkg/modules/chromium/browser.go filters the main URL once:

err := gotenberg.FilterOutboundURL(ctx, url, b.arguments.allowList, b.arguments.denyList, deadline)
if err != nil {
	return fmt.Errorf("filter URL: %w", err)
}

That is the first validator. The addresses it resolved are gone. The string URL is then handed to Chromium, which begins navigation.

Chromium 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:

err := gotenberg.FilterOutboundURL(ctx, e.Request.URL, options.allowList, options.denyList, deadline)
if err != nil {
	logger.WarnContext(ctx, err.Error())
	allow = false
}

// ... allowed-file-prefix check elided ...

if !allow {
	req := fetch.FailRequest(e.RequestID, network.ErrorReasonAccessDenied)
	err = req.Do(executorCtx)
	// ...
	return
}

req := fetch.ContinueRequest(e.RequestID)

The 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.

Two gates inside Gotenberg's Go process. Two DNS resolutions. Zero addresses survive to where Chromium dials.

Three DNS resolutions for one request.

What 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).

Three resolutions happen in the request's lifetime, none of them sharing an answer:

  1. 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.

  2. 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.

  3. 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.

The 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.

The patch is not a fifth string parser.

The 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's patch added strings.ToLower(parsed.Scheme) before the regex. CVE-2026-42596's patch removed the case-class deny-list entirely. CVE-2026-40893's patch added a strings.LastIndex(key, ":") group-prefix strip before EqualFold. CVE-2026-42590'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.

The 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.

The 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:

type pinningProxy struct {
	allowList []*regexp2.Regexp
	denyList  []*regexp2.Regexp

	decide func(ctx context.Context, rawURL string, allowList, denyList []*regexp2.Regexp, deadline time.Time) (gotenberg.OutboundDecision, error)
	dialPinned func(ctx context.Context, network string, addrs []netip.Addr, port string) (net.Conn, error)
	dialBypass func(ctx context.Context, network, addr string) (net.Conn, error)
	// ...
}

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:<ephemeral>. 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:

decision, err := p.decide(req.Context(), "https://"+req.Host, p.allowList, p.denyList, deadline)
if err != nil {
	// ... 403 ...
}

var upstream net.Conn
switch {
case decision.Bypass:
	upstream, err = p.dialBypass(req.Context(), "tcp", req.Host)
case len(decision.Pinned) > 0:
	upstream, err = p.dialPinned(req.Context(), "tcp", decision.Pinned, port)
default:
	err = errors.New("no pinned addresses and not bypassed")
}

The 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."

The 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.

Fifth Gotenberg exhibit. One design.

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), URL host IPv6 unmapping (CVE-2026-42596), ExifTool tag-name group prefix (CVE-2026-40893), ExifTool tag-name case folding (CVE-2026-42590). 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.

The 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.

Advisory: GHSA-2pmr-289p-44r3. Patch: commit 35f1a99. Fixed in 8.32.0.

FilterOutboundURL still throws the address away. The pinning proxy makes that not matter.