Two vulnerabilities in the Gotenberg tool: file disclosure and URL filter bypass

This article examines two critical vulnerabilities in the Gotenberg tool affecting versions up to and including v8.31.0. Both issues allow an unauthenticated attacker to access internal resources and were fixed in v8.32.0.
CVE-2026-42593: file disclosure via the stampExpression parameter
An unauthenticated attacker can read files from the container's filesystem through the PDF merge, split, and conversion routes. In the dedicated /forms/pdfengines/stamp route, validation required an uploaded file when stampSource was set to pdf or image. The file had to be provided via the stampFile parameter (otherwise, the server returned HTTP 400). The six other routes, including /forms/pdfengines/merge, used only an assignment check: the value of stampExpression was replaced with the path of the uploaded file only when stampFile was present; otherwise, the caller-supplied value was retained. Affected versions: v8.28.0 through v8.31.0 (including the Docker image gotenberg/gotenberg:8.31.0). The process runs as the gotenberg user and can read files mounted in the container.
CVE-2026-42592: outbound URL filter bypass via DNS rebinding
An unauthenticated attacker can send an HTTP POST request to /forms/chromium/convert/url with the URL of their HTTPS endpoint and make the Chromium browser connect to the internal network, returning the response as a PDF file. The root cause is the FilterOutboundURL function in pkg/gotenberg/outbound.go: it checks the address using ResolveAndCheckPublic, but returns only the error object, discarding the list of allowed IP addresses (the result of the decideOutbound function). When rendering the page, Gotenberg checks the URL in chromiumBrowser.do and in the CDP (Chrome DevTools Protocol) event handler in pkg/modules/chromium/events.go. Both checks perform their own DNS lookups but do not pass the IP address to the browser — after fetch.ContinueRequest is called, the Chromium browser resolves the hostname itself through the HostResolver component and opens a TCP connection. Affected versions: Gotenberg 8.31.0 and earlier.
Researchers
Vendors
Products