{"id":"CVE-2026-45741","aliases":["CVE-2026-45741","GHSA-86m8-88fq-xfxp","GO-2026-5244"],"related":[],"kind":"vulnerability","state":"published","title":"Gotenberg: SSRF deny-list bypass in IsPublicIP via IPv6 6to4 / NAT64 / site-local prefixes","summary":"Gotenberg is a Docker-powered stateless API for PDF files. In 8.32.0 and earlier, the IsPublicIP function in pkg/gotenberg/outbound.go does not reject the 2002::/16 6to4 prefix, the 64:ff9b::/96 and 64:ff9b:1::/48 NAT64 prefixes, the fec0::/10 deprecated site-local prefix, Teredo, and other transition prefixes that can embed or route to non-public IPv4 destinations. The addr.Unmap operation only handles IPv4-mapped IPv6 addresses, so a crafted DNS AAAA record can cause the outbound HTTP client to treat an address wrapping an internal destination such as 169.254.169.254 as public. An unauthenticated attacker can use a conversion route with WithDenyPrivateIPs enabled to reach cloud metadata services, and the Chromium URL conversion route can return the internal response as a PDF, potentially exposing cloud credentials. Exploitation requires a deployment whose host routes the relevant IPv6 prefix, such as a dual-stack or NAT64-enabled environment. This issue is fixed in version 8.33.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gotenberg is a Docker-powered stateless API for PDF files. In 8.32.0 and earlier, the IsPublicIP function in pkg/gotenberg/outbound.go does not reject the 2002::/16 6to4 prefix, the 64:ff9b::/96 and 64:ff9b:1::/48 NAT64 prefixes, the fec0::/10 deprecated site-local prefix, Teredo, and other transition prefixes that can embed or route to non-public IPv4 destinations. The addr.Unmap operation only handles IPv4-mapped IPv6 addresses, so a crafted DNS AAAA record can cause the outbound HTTP client to treat an address wrapping an internal destination such as 169.254.169.254 as public. An unauthenticated attacker can use a conversion route with WithDenyPrivateIPs enabled to reach cloud metadata services, and the Chromium URL conversion route can return the internal response as a PDF, potentially exposing cloud credentials. Exploitation requires a deployment whose host routes the relevant IPv6 prefix, such as a dual-stack or NAT64-enabled environment. This issue is fixed in version 8.33.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`IsPublicIP` in `pkg/gotenberg/outbound.go` incorrectly classifies IPv6 6to4 / NAT64 / deprecated site-local addresses as public IPs, allowing an unauthenticated attacker to reach internal destinations (e.g., cloud metadata services at `169.254.169.254`) via a single crafted DNS AAAA record. This is a variant of CVE-2026-44430 (modelcontextprotocol/registry).\n\n### Details\n\n`IsPublicIP` uses Go stdlib helpers (`IsLoopback`, `IsPrivate`, `IsLinkLocalUnicast`, etc.) to block internal IPs. However, these helpers do not recognize IPv6 prefixes that embed IPv4 addresses:\n\n| Prefix | RFC | Tunnels to |\n|--------|-----|-----------|\n| `2002::/16` | RFC 3056 (6to4) | IPv4 in bits 16-47 |\n| `64:ff9b::/96` | RFC 6052 (NAT64 well-known) | IPv4 in low 32 bits |\n| `64:ff9b:1::/48` | RFC 8215 (NAT64 local-use) | IPv4 in low 32 bits |\n| `fec0::/10` | RFC 3879 (deprecated site-local) | internal routing |\n\n`addr.Unmap()` only handles `::ffff:0:0/96` (IPv4-mapped) and has no effect on these prefixes. On dual-stack or NAT64-enabled cloud hosts, the OS kernel transparently routes these addresses to their embedded internal IPv4 destinations.\n\nVulnerable code (`pkg/gotenberg/outbound.go` L53-69, commit `93d0103`):\n\n```go\nfunc IsPublicIP(addr netip.Addr) bool {\n    addr = addr.Unmap() // only handles ::ffff:x.x.x.x\n    switch {\n    case addr.IsLoopback(), addr.IsPrivate(),\n         addr.IsLinkLocalUnicast(), ...:\n        return false\n    }\n    return true // 6to4/NAT64/site-local incorrectly reaches here\n}\n```\n\n### PoC\n```\ncd poc/\n./build.sh   # docker build (~30s)\n./run.sh     # docker run — exits with code 1 (bug detected)\n```\n\nExpected output: `IsPublicIP(2002:a9fe:a9fe::) = true` — the function returns true for 3 addresses that wrap 169.254.169.254 (AWS IMDS). Full test file available via GHSA private comment on request.\n\n### Impact\n\nAn unauthenticated attacker controlling a DNS AAAA record can tunnel gotenberg's outbound HTTP client to AWS/GCP/Azure IMDS (169.254.169.254), leaking IAM credentials. The Chromium URL convert route returns the full response as a PDF (full-read SSRF). Affects all deployments with `WithDenyPrivateIPs(true)` on dual-stack or NAT64-enabled hosts.\n\n### Suggested Fix\n\nAdd explicit prefix checks after `addr.Unmap()`:\n```\nvar blockedIPv6Prefixes = []netip.Prefix{\n    netip.MustParsePrefix(\"2002::/16\"),\n    netip.MustParsePrefix(\"64:ff9b::/96\"),\n    netip.MustParsePrefix(\"64:ff9b:1::/48\"),\n    netip.MustParsePrefix(\"fec0::/10\"),\n}\nfor _, p := range blockedIPv6Prefixes {\n    if p.Contains(addr) { return false }\n}\n```","format":"markdown","source":"ghsa"},{"lang":"en","text":"SSRF deny-list bypass in IsPublicIP via IPv6 prefixes in github.com/gotenberg/gotenberg","format":"markdown","source":"go"},{"lang":"es","text":"Gotenberg es una API sin estado impulsada por Docker para archivos PDF. En la versión 8.32.0 y anteriores, la función IsPublicIP en pkg/gotenberg/outbound.go no rechaza el prefijo 6to4 2002::/16, los prefijos NAT64 64:ff9b::/96 y 64:ff9b:1::/48, el prefijo site-local obsoleto fec0::/10, Teredo, y otros prefijos de transición que pueden incrustar o enrutar a destinos IPv4 no públicos. La operación addr.Unmap solo maneja direcciones IPv6 mapeadas a IPv4, por lo que un registro DNS AAAA manipulado puede hacer que el cliente HTTP saliente trate una dirección que envuelve un destino interno como 169.254.169.254 como pública. Un atacante no autenticado puede usar una ruta de conversión con WithDenyPrivateIPs habilitado para alcanzar servicios de metadatos en la nube, y la ruta de conversión de URL de Chromium puede devolver la respuesta interna como un PDF, exponiendo potencialmente credenciales de la nube. La explotación requiere una implementación cuyo host enrute el prefijo IPv6 relevante, como un entorno de doble pila o habilitado para NAT64. Este problema está solucionado en la versión 8.33.0.","source":"nvd"}],"published":"2026-05-29T16:50:37.000Z","modified":"2026-11-24T17:30:07.547Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-184","CWE-918"],"affected":[{"ranges":[{"version":"< 8.33.0","status":"affected"}],"vendor":"gotenberg","product":"gotenberg","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"8.32.0"}],"ecosystem":"Go","package":"github.com/gotenberg/gotenberg/v8","purl":"pkg:golang/github.com/gotenberg/gotenberg/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.33.0"}],"ecosystem":"Go","package":"github.com/gotenberg/gotenberg/v8","purl":"pkg:golang/github.com/gotenberg/gotenberg/v8","source":"go"}],"references":[{"url":"https://github.com/gotenberg/gotenberg/security/advisories/GHSA-86m8-88fq-xfxp","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gotenberg/gotenberg/commit/f9a01c9fb308372170ab7fc97b17a118ee8a125c","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/gotenberg/gotenberg/releases/tag/v8.33.0","tags":["web","x-refsource-misc"],"sources":["cvelist","go","nvd"]},{"url":"https://github.com/gotenberg/gotenberg","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-19T18:41:11.311Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45741","url":"https://www.cve.org/CVERecord?id=CVE-2026-45741","licence":"CVE Terms of Use","modified":"2026-08-19T18:41:18.075Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-86m8-88fq-xfxp","url":"https://github.com/advisories/GHSA-86m8-88fq-xfxp","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:04.962Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5244","url":"https://pkg.go.dev/vuln/GO-2026-5244","licence":"CC-BY-4.0","modified":"2026-11-24T17:30:07.547Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45741","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45741","licence":"Public domain","modified":"2026-10-27T13:10:00.360Z"}],"updatedAt":"2026-11-25T22:59:33.955Z","epss":{"score":0.00756,"percentile":0.56357,"date":"2026-12-01T12:00:22.000Z"}}