llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/gotenberg/gotenberg/v8

GHSA-FRHV-F8PQ-H8G2

SSRF deny-list bypass: IsPublicIP omits IPv6 benchmarking range 2001:2::/48 while blocking the IPv4 equivalent

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -6 d de la divulgación
Exposición10 dDesde la divulgación, 11 nov 2026, 2:18 a. m.
Detección7 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Yo la vigilo, tú la programas. ¿Trato?Ponle una regla en tu SIEM y seguimos.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v8.40.0
Monitoreo
Detectada +1
5 nov 26
11 nov 26
18 nov 26
21 nov 26
5 nov 26
9 nov 26
13 nov 26
17 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche v8.40.0 github.com/gotenberg/gotenberg/v8 · -6 d desde divulgación
Divulgación Publicada GHSA-FRHV-F8PQ-H8G2 divulgada · CVSS 7.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

Gotenberg's private-IP SSRF guard classifies the IPv6 benchmarking range `2001:2::/48` (RFC 5180 / RFC 8219) as a public address. `IsPublicIP` in `pkg/gotenberg/outbound.go` enumerates a fixed list of non-public IPv6 prefixes, but that list omits `2001:2::/48` even though the IPv4 benchmarking counterpart `198.18.0.0/15` (RFC 2544) is explicitly blocked. When an operator enables the deny-private-IPs protection, an unauthenticated attacker who can point an outbound URL at an address in `2001:2::/48` (directly, or via a crafted DNS AAAA record) reaches that address instead of being rejected. On a host that routes this range to an internal destination, the Chromium URL conversion path returns the fetched response as a PDF, yielding a full-read SSRF.

Root Cause

Gotenberg blocks outbound requests to internal networks through a denylist of address classes. `IsPublicIP` first applies the Go standard library predicates (`IsLoopback`, `IsPrivate`, `IsLinkLocalUnicast`, `IsLinkLocalMulticast`, `IsMulticast`, `IsUnspecified`, `IsInterfaceLocalMulticast`), then iterates two custom prefix slices for ranges the standard library does not classify. The security invariant is that every address range reserved for non-internet use is treated as non-public. That invariant is violated for IPv6 benchmarking addresses: `nonPublicIPv6Prefixes` lists eight prefixes, none of which contain `2001:2::/48`. The nearest entry, Teredo `2001::/32`, covers only `2001:0000::/32`; an address such as `2001:2::1` has its first 32 bits equal to `0x20010002`, outside `0x20010000`, so it is not matched. Because no predicate and no prefix matches, `IsPublicIP` returns `true` and the address is treated as a legitimate public destination.

pkg/gotenberg/outbound.go:77-86   nonPublicIPv6Prefixes (8 entries; 2001:2::/48 absent)
pkg/gotenberg/outbound.go:95-98   nonPublicIPv4Prefixes (includes 198.18.0.0/15, RFC 2544 benchmarking)
pkg/gotenberg/outbound.go:114     func IsPublicIP (returns true for 2001:2::1)

Impact

The attacker needs no authentication; Gotenberg's HTTP API requires none by default. Exploitation applies when an operator has enabled the deny-private-IPs protection for the relevant module (`--chromium-deny-private-ips`, `--api-download-from-deny-private-ips`, `--webhook-deny-private-ips`, or `--libreoffice-deny-private-ips`; each defaults to off), which is precisely the configuration in which this gap matters. It additionally requires that `2001:2::/48` be routed to a reachable destination in the deployment's network. RFC 5180 Section 4 states this range must not be routed in production IPv6 networks, so on a compliant network the request is dropped; container, cloud, lab, or benchmarking networks that do not filter the range can route it internally. Where the range is routable, the attacker gains an SSRF primitive against internal services: through the Chromium URL conversion route the fetched response is rendered and returned as a PDF, so an internal HTTP response can be exfiltrated in full. Where the webhook protection is also enabled, the same classification gap accepts an attacker-supplied webhook destination in this range, so Gotenberg delivers a POST, PUT, or PATCH request with attacker-chosen extra headers to an internal endpoint; the body is the converted output rather than arbitrary content, which limits the effect on internal state without removing it. This is the same protection and the same impact class covered by the published advisory for this guard; the omitted IPv6 benchmarking prefix is an additional unblocked path.

Proof of Concept

Classification check against the exact prefix lists shipped in pkg/gotenberg/outbound.go.
No running instance is required to demonstrate the misclassification.
  1. Build the eight-entry `nonPublicIPv6Prefixes` list and the two-entry `nonPublicIPv4Prefixes` list exactly as defined in `pkg/gotenberg/outbound.go`.
  2. Evaluate `2001:2::1` against the standard library predicates and both prefix lists, mirroring `IsPublicIP`.
  3. Compare with the IPv4 benchmarking counterpart `198.18.0.1`.
import ipaddress

non_public_v6 = ["2002::/16", "2001::/32", "64:ff9b::/96", "64:ff9b:1::/48",
                 "fec0::/10", "::/96", "2001:db8::/32", "100::/64"]
non_public_v4 = ["100.64.0.0/10", "198.18.0.0/15"]

def is_public(ip):
    a = ipaddress.ip_address(ip)
    if any(a in ipaddress.ip_network(p) for p in (non_public_v4 if a.version == 4 else non_public_v6)):
        return False
    return not (a.is_loopback or a.is_private or a.is_link_local or
                a.is_multicast or a.is_unspecified)

for ip in ("2001:2::1", "2001:2:ffff::1", "198.18.0.1"):
    print(ip, "-> IsPublicIP =", is_public(ip))
2001:2::1 -> IsPublicIP = True
2001:2:ffff::1 -> IsPublicIP = True
198.18.0.1 -> IsPublicIP = False

Against a running instance started with `--chromium-deny-private-ips`, a request to `POST /forms/chromium/convert/url` with `url=http://[2001:2::1]/` passes the guard and is dialed, whereas `url=http://198.18.0.1/` is rejected.

Attack Chain

  1. Exposure: The attacker sends an unauthenticated request to a URL-fetching endpoint such as `POST /forms/chromium/convert/url` (`pkg/modules/chromium/routes.go:467`) with an attacker-controlled `url`.
  2. Control: The attacker supplies `http://[2001:2::1]/` (or a hostname whose AAAA record resolves into `2001:2::/48`). The host survives parsing as a literal IPv6 address.
  3. Path: The request reaches `FilterOutboundURL` (`pkg/modules/chromium/browser.go:513`), which calls `DecideOutbound` (`pkg/gotenberg/outbound.go:301`), which calls `resolveHost` (`pkg/gotenberg/outbound.go:166`); with deny-private-IPs enabled, `resolveHost` rejects any address for which `IsPublicIP` returns `false`.
  4. Guard: `IsPublicIP` (`pkg/gotenberg/outbound.go:114`) returns `true` for `2001:2::1`: no standard library predicate matches and none of the eight entries in `nonPublicIPv6Prefixes` (`pkg/gotenberg/outbound.go:77-86`) contains the address.
  5. Primitive: The address passes the check and `DecideOutbound` returns a pinned decision; `secureDialContext` (`pkg/gotenberg/outbound.go:625`) dials `2001:2::1` directly.
  6. Result: Where the network routes `2001:2::/48` internally, the HTTP response from the internal destination is rendered by Chromium and returned to the attacker as a PDF, a full-read SSRF against internal services.

Bypass Evidence

The relevant protection is the deny-private-IPs classification in `IsPublicIP`, which is the subject of the published advisory GHSA-86m8-88fq-xfxp (CVE-2026-45741). The strongest challenge is whether an existing entry already covers `2001:2::/48`; it does not. The nearest prefix, Teredo `2001::/32`, matches only addresses whose first 32 bits equal `0x20010000`, while `2001:2::1` has first 32 bits `0x20010002`, so `netip.Prefix.Contains` returns false. The remaining seven custom prefixes and all seven standard library predicates were each evaluated against `2001:2::1` and none match, so `IsPublicIP` returns `true`. The precise new evidence beyond the published advisory is the asymmetry with the IPv4 path: the follow-up fix added the IPv4 benchmarking range `198.18.0.0/15` to `nonPublicIPv4Prefixes` (`pkg/gotenberg/outbound.go:95-98`) and the unit tests cover `198.18.0.1` (`pkg/gotenberg/outbound_test.go:53`), but the IPv6 benchmarking range `2001:2::/48` was never added and is not exercised by any test. The misclassification is deterministic from the shipped source; live routing to an internal target depends on the deployment network and was not executed.

Affected Versions

  • Ecosystem: `go`
  • Package: `github.com/gotenberg/gotenberg/v8`
  • Confirmed affected range: `<= 8.37.0`
  • Latest release checked: `v8.37.0` (pkg.go.dev https://pkg.go.dev/github.com/gotenberg/gotenberg/v8@v8.37.0)
  • Fix status: not fixed

The `nonPublicIPv6Prefixes` list has never contained `2001:2::/48`. The IPv4 benchmarking prefix was added in commit `40cf484`, which is contained in the `v8.37.0` tag, confirming the intent to block benchmarking ranges; no corresponding IPv6 entry was added, and no branch in the examined checkout adds one. The introduction boundary cannot be pinned precisely because the omission predates and persists through the custom-prefix list: earlier releases lacked the entire list, so the range was unblocked there as part of the broader original issue.

Suggested Fix

Add `2001:2::/48` to `nonPublicIPv6Prefixes` so the IPv6 benchmarking range is classified as non-public, matching the existing treatment of the IPv4 benchmarking range `198.18.0.0/15`. Because this guard is a denylist of reserved ranges, review it against the current IANA IPv6 special-purpose and IPv4 special-purpose registries so other reserved-but-routable ranges are not similarly omitted, and add a regression test for `2001:2::1` alongside the existing `198.18.0.1` case. As an interim measure where feasible, restrict outbound destinations with the allow-list option or block `2001:2::/48` at the network layer; this does not remove the classification gap.

---

Reported by zx.

Patches

Fixed on `main` for 8.40.0 by a0091e9 https://github.com/gotenberg/gotenberg/commit/a0091e94fcb28670621fd83f922fb984ccdde26d, and on `next` for 9.0.0 by ef8257d https://github.com/gotenberg/gotenberg/commit/ef8257dad1d149044b425fb42a8e50fd91abc4fc. `IsPublicIP` now treats every block the IANA special-purpose registries mark as not globally reachable as non-public: the whole IETF protocol assignments block `2001::/23`, which holds `2001:2::/48`, plus `3fff::/20`, `5f00::/16` and `100:0:0:1::/64`. On `main`, c7c09d8 https://github.com/gotenberg/gotenberg/commit/c7c09d80fe98e289642de59a4aff92ad5600648f does the same for IPv4: `0.0.0.0/8`, `192.0.0.0/24`, the documentation ranges and `240.0.0.0/4`.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/gotenberg/gotenberg/v8≤ 8.39.0
8.39.0
v8.40.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/gotenberg/gotenberg/v8
Corregida v8.40.0 -6 d v8.40.0 no afectada
Versiones corregidasv8.40.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/gotenberg/gotenberg/security/advisories/GHSA-frhv-f8pq-h8g2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.