Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-45741

CVE-2026-45741: Gotenberg Information Disclosure Flaw

CVE-2026-45741 is an information disclosure vulnerability in Gotenberg that allows attackers to access cloud metadata services via crafted IPv6 addresses. This post covers technical details, affected versions, and fixes.

Updated:

CVE-2026-45741 Overview

CVE-2026-45741 is a Server-Side Request Forgery (SSRF) vulnerability in Gotenberg, a Docker-powered stateless API for PDF file generation. The flaw exists in the IsPublicIP function within pkg/gotenberg/outbound.go in versions 8.32.0 and earlier. The function fails to reject several IPv6 transition and non-public prefixes that can embed or route to internal IPv4 destinations. An unauthenticated attacker can craft a DNS AAAA record that wraps an internal address such as 169.254.169.254, bypassing the WithDenyPrivateIPs control. Exploitation via the Chromium URL conversion route can return internal responses as PDF output, exposing cloud metadata and credentials.

Critical Impact

Unauthenticated attackers can reach cloud instance metadata services and exfiltrate credentials by exploiting incomplete IPv6 address validation in dual-stack or NAT64-enabled deployments.

Affected Products

  • Gotenberg versions 8.32.0 and earlier
  • Deployments where the host routes affected IPv6 transition prefixes
  • Dual-stack and NAT64-enabled Gotenberg environments

Discovery Timeline

  • 2026-08-19 - CVE-2026-45741 published to NVD
  • 2026-08-19 - Last updated in NVD database

Technical Details for CVE-2026-45741

Vulnerability Analysis

The vulnerability is an Incorrect Behavior Order for Input Validation issue tracked as [CWE-184]. Gotenberg's outbound HTTP client uses IsPublicIP to enforce the WithDenyPrivateIPs policy. The check relies on netip.Addr helpers and an addr.Unmap call to canonicalize IPv6 addresses before classification.

The Unmap operation only handles IPv4-mapped IPv6 addresses in the ::ffff:0:0/96 range. It does not unwrap addresses within 6to4 (2002::/16), Teredo (2001::/32), NAT64 (64:ff9b::/96, 64:ff9b:1::/48), deprecated site-local (fec0::/10), or IPv4-compatible IPv6 (::/96) prefixes. Each of these formats can embed an IPv4 destination in their lower bits.

An attacker controls the DNS AAAA record returned for a target hostname. When the host operating system routes the crafted IPv6 address through a 6to4 or NAT64 gateway, the outbound request reaches an internal IPv4 destination such as the cloud instance metadata endpoint 169.254.169.254. The Chromium URL conversion route then returns the retrieved content as a PDF document.

Root Cause

The validation logic in pkg/gotenberg/outbound.go treats any IPv6 address outside the standard private ranges as public. It does not enumerate transition and translation prefixes that can carry embedded or routed IPv4 destinations, producing an incorrect allow decision.

Attack Vector

Exploitation requires an unauthenticated request to a Gotenberg conversion route with WithDenyPrivateIPs enabled. The attacker supplies a URL whose hostname resolves to an AAAA record inside an affected prefix. On a dual-stack or NAT64-capable host, the request reaches the embedded IPv4 destination and returns metadata service content to the attacker.

go
// Security patch in pkg/gotenberg/outbound.go
// nonPublicIPv6Prefixes lists IPv6 ranges that the standard library does
// not classify via [netip.Addr] helpers but that must not be considered
// public:
//
//   - 2002::/16    6to4 (RFC 3056, deprecated by RFC 7526). Bits 16-47
//     embed an IPv4 destination, including private ones.
//   - 2001::/32    Teredo (RFC 4380). Bits 96-127 embed an IPv4
//     destination, including private ones.
//   - 64:ff9b::/96 NAT64 well-known prefix (RFC 6052). Low 32 bits
//     embed an IPv4 destination translated by a NAT64 gateway.
//   - 64:ff9b:1::/48 NAT64 local-use prefix (RFC 8215). Same risk.
//   - fec0::/10    Deprecated site-local (RFC 3879). Not covered by
//     [netip.Addr.IsPrivate] which only handles fc00::/7.
//   - ::/96        IPv4-compatible IPv6 (deprecated). Embeds an IPv4
//     destination and is not handled by [netip.Addr.Unmap].
//   - 2001:db8::/32 Documentation range (RFC 3849). Never routable.
//   - 100::/64     Discard prefix (RFC 6666).
var nonPublicIPv6Prefixes = []netip.Prefix{
    netip.MustParsePrefix("2002::/16"),
    netip.MustParsePrefix("2001::/32"),
    netip.MustParsePrefix("64:ff9b::/96"),
    netip.MustParsePrefix("64:ff9b:1::/48"),
    netip.MustParsePrefix("fec0::/10"),
    netip.MustParsePrefix("::/96"),
    netip.MustParsePrefix("2001:db8::/32"),
    netip.MustParsePrefix("100::/64"),
}

Source: GitHub Commit f9a01c9

Detection Methods for CVE-2026-45741

Indicators of Compromise

  • Outbound HTTP requests from Gotenberg containers to link-local addresses such as 169.254.169.254 or fd00:ec2::254.
  • DNS AAAA responses to Gotenberg resolvers containing addresses in 2002::/16, 2001::/32, 64:ff9b::/96, 64:ff9b:1::/48, fec0::/10, or ::/96.
  • Conversion job logs referencing external URLs whose responses match cloud metadata JSON schemas.

Detection Strategies

  • Inspect Gotenberg egress traffic for connections destined to cloud metadata IP ranges regardless of protocol family.
  • Alert on DNS resolutions returning IPv6 transition prefixes when the querying process is a PDF conversion workload.
  • Correlate PDF conversion request URLs with subsequent outbound flows that terminate at internal RFC 1918 or link-local endpoints.

Monitoring Recommendations

  • Enable VPC flow logs and container network telemetry for all Gotenberg workloads.
  • Enforce IMDSv2 on AWS EC2 hosts and record metadata service access attempts.
  • Log all requests to Gotenberg conversion endpoints with the target URL and resolved address recorded for audit review.

How to Mitigate CVE-2026-45741

Immediate Actions Required

  • Upgrade Gotenberg to version 8.33.0 or later, which extends IsPublicIP to reject the affected IPv6 prefixes.
  • Require IMDSv2 with hop-limit restrictions on cloud hosts running Gotenberg to prevent metadata credential theft.
  • Restrict Gotenberg container egress to an explicit allowlist of external destinations required for conversions.

Patch Information

The fix is delivered in Gotenberg v8.33.0. The patch introduces the nonPublicIPv6Prefixes list in pkg/gotenberg/outbound.go and rejects any address that falls within these prefixes before the outbound HTTP client executes. Review the GitHub Security Advisory GHSA-86m8-88fq-xfxp for full remediation details.

Workarounds

  • Disable IPv6 on Gotenberg container network interfaces if dual-stack operation is not required.
  • Block outbound traffic to 169.254.169.254, fd00:ec2::254, and other cloud metadata endpoints at the host firewall.
  • Deploy Gotenberg behind an egress proxy that enforces destination allowlisting independent of the application's own IP checks.
bash
# Restrict Gotenberg container egress to block cloud metadata access
iptables -I OUTPUT -d 169.254.169.254 -j DROP
ip6tables -I OUTPUT -d fd00:ec2::254 -j DROP

# Block routing of IPv6 transition prefixes from container network
ip6tables -I OUTPUT -d 2002::/16 -j DROP
ip6tables -I OUTPUT -d 64:ff9b::/96 -j DROP
ip6tables -I OUTPUT -d 64:ff9b:1::/48 -j DROP
ip6tables -I OUTPUT -d fec0::/10 -j DROP

# Upgrade to patched Gotenberg version
docker pull gotenberg/gotenberg:8.33.0

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.