Summary
Gotenberg's outbound IP validation can incorrectly classify certain IPv6 transition and translation addresses as public, even when they route to private IPv4 destinations. An unauthenticated attacker may abuse a conversion endpoint and crafted DNS responses to reach cloud metadata services and potentially expose credentials when the deployment supports the relevant IPv6 routes.
Affected context
The vulnerability affects Gotenberg deployments using outbound request protections such as WithDenyPrivateIPs when the host or network supports dual-stack, NAT64, 6to4, Teredo, or other relevant IPv6 transition mechanisms. It becomes risky when a conversion route resolves attacker-influenced hostnames and the IP validation logic fails to recognize IPv6 addresses that can reach private or link-local destinations.
Exploit preconditions
- Attack surface: Gotenberg conversion routes that make outbound HTTP requests
- Required access: No authentication may be required when the affected route is publicly reachable
- Trigger point: DNS resolution and outbound address validation before a server-side request
- Network condition: The deployment must route one or more relevant IPv6 transition or translation prefixes
- Why exploitation is possible: The validator does not comprehensively classify addresses that embed or translate to private IPv4 destinations, allowing an internal target to be treated as public
Why this happens
The issue is caused by incomplete IP address classification in the outbound request allow or deny logic. The IsPublicIP function rejects some private address forms but does not account for several IPv6 transition, NAT64, and deprecated site-local prefixes that can represent or route to non-public IPv4 addresses. This maps primarily to CWE-918: Server-Side Request Forgery, with CWE-184: Incomplete List of Disallowed Inputs describing the incomplete blacklist of restricted address ranges.
Potential impact
- An attacker may reach cloud instance metadata services
- Internal service responses could be retrieved through document conversion
- Cloud credentials or temporary access tokens could be exposed
- Internal network topology or service information could be disclosed
- Compromised credentials could enable broader access depending on assigned permissions
General mitigation guidance
Mitigation generally focuses on making outbound destination controls comprehensive and deny-by-default.
Common defensive patterns include:
- Use a well-maintained IP classification mechanism that evaluates IPv4, IPv6, mapped, translated, and transition addresses consistently
- Treat link-local, loopback, private, reserved, site-local, metadata, and transition prefixes as restricted unless explicitly approved
- Resolve hostnames and validate every resulting address immediately before connection establishment
- Prefer explicit outbound destination allowlists over incomplete deny lists where the workflow permits
- Isolate conversion workers from cloud metadata services and unnecessary internal networks
- Apply least-privilege network policies and minimize credentials available to conversion processes
- Keep generated documents and outbound responses separated from sensitive internal response content
How teams detect issues like this
Organizations can look for:
- Static analysis findings around custom public-IP checks, incomplete address-range lists, and hostname validation performed separately from connection establishment
- Code review signals involving DNS resolution, IPv6 normalization, address unmapping, NAT64, 6to4, Teredo, or server-side URL fetching
- Dynamic tests covering private, loopback, link-local, mapped, translated, and transition IPv6 representations
- Network policy alerts for conversion workers attempting connections to metadata endpoints or internal address space
- Egress logs correlating user-supplied hostnames with requests to restricted networks
Automated security review tools may help identify SSRF sinks and incomplete destination validation, but network-level enforcement remains an important independent control.

