GHSA-FQG9-X2XW-5CRX
IPv6 zone identifier reopens every prefix the CVE-2026-45741 fix added to IsPublicIP
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche v8.38.0 | github.com/gotenberg/gotenberg/v8 · -29 d desde divulgación | |
| Divulgación | Publicada | GHSA-FQG9-X2XW-5CRX divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Incomplete fix for CVE-2026-45741 https://github.com/gotenberg/gotenberg/security/advisories/GHSA-8v5r-q3wv-4vfr. Appending an IPv6 zone identifier to any address `IsPublicIP` blocks *by prefix* — or to the unspecified address `::` — reclassifies it as public and reaches the destination it names.
http://[fec0:1234::3]:8080/x -> 403 Forbidden
http://[fec0:1234::3%25eth0]:8080/x -> reachedThe prefix loop that the CVE-2026-45741 fix introduced is the exact mechanism the bypass defeats: every prefix that fix added — 6to4, Teredo, both NAT64 ranges, `fec0::/10`, `::/96` — is re-opened by a four-character suffix. The fix and the bypass are the same lines.
Details
`pkg/gotenberg/outbound.go:112-142`:
func IsPublicIP(addr netip.Addr) bool {
...
addr = addr.Unmap()
switch {
case addr.IsLoopback(),
addr.IsPrivate(),
addr.IsLinkLocalUnicast(),
addr.IsLinkLocalMulticast(),
addr.IsMulticast(),
addr.IsUnspecified(), // <- identity comparison
addr.IsInterfaceLocalMulticast():
return false
}
...
if addr.Is6() {
for _, p := range nonPublicIPv6Prefixes {
if p.Contains(addr) { // <- false for any zoned address
return false
}
}
}
return true
}Two independent zone-blindnesses, in one 32-line predicate.
`netip.Prefix.Contains` returns false whenever the address carries a zone — Go documents this — so neither prefix loop can match a zoned address and the whole deny-list silently stops applying. And `IsUnspecified` compares by struct identity (`ip == IPv6Unspecified()`), so `::%251` is not unspecified.
Eight of the ten guards in this predicate handle zones correctly, and that is what makes the other two wrong rather than merely unimplemented. `IsLoopback`, `IsPrivate` and the link-local helpers inspect bytes, so they still fire. Measured against the Go runtime rather than taken from the docs:
| input | `Contains(fec0::/10)` | `IsUnspecified` | `IsLoopback` |
|---|---|---|---|
| `fec0:1234::3` | true | false | false |
| `fec0:1234::3%251` | false — hole | false | false |
| `::` | false | true | false |
| `::%251` | false | false — hole | false |
| `::1` | false | false | true |
| `::1%251` | false | false | true — holds |
`IsUnspecified` and `IsLoopback` sit on adjacent lines of the same `switch` and only one of them survives a zone.
The input-space table
Every spelling was tested rather than a few guessed. Twelve IPv4 encodings — decimal, octal, hex, dword, short form, trailing dot, `0.0.0.0`, `localhost`, three resolving hostnames: all blocked. Thirteen IPv6 spellings — expanded, v4-mapped, uppercase hex, v4-compatible, 6to4, both NAT64, ISATAP, `fec0::`, `2001:db8::`, `100::`: all blocked. Zoned loopback, link-local, ULA and v4-mapped: all blocked, by the byte-inspecting helpers.
The empty cell is exactly: `[::%25…]` in any zone spelling, and `[fec0:…%25…]`.
PoC
Released image `gotenberg/gotenberg:8.37.0`, with `API_DOWNLOAD_FROM_DENY_PRIVATE_IPS=true`. `git diff v8.37.0..main -- pkg/gotenberg/outbound.go` is empty, so this is not a `main`-only finding.
A Python listener bound to `127.0.0.1:9999` only, inside the Gotenberg container, serving a marker token; a second listener on `fec0:1234::3:8080` in a separate container. Every request below is issued from outside, unauthenticated, against Gotenberg's published port.
--- negative controls: plainly blocked destinations, same run ---
127.0.0.1:9999 (the internal service, bare) => HTTP 403 Forbidden
[::1]:9999 (loopback IPv6) => HTTP 403 Forbidden
[::]:9999 (unspecified) => HTTP 403 Forbidden
169.254.169.254 (cloud metadata) => HTTP 403 Forbidden
[fec0:1234::3]:8080 (site-local, bare) => HTTP 403 Forbidden
--- the bypass: identical destinations, one zone identifier appended ---
[::%25251]:9999 => HTTP 200 [PDF 8846 bytes] %PDF-
[::%25lo]:9999 => HTTP 200 [PDF 8846 bytes] %PDF-
[fec0:1234::3%25eth0]:8080 => reached (400 from Gotenberg for a missing header, i.e. the fetch happened)The PDF is not merely evidence of a connection — it carries the data:
$ pypdf extract_text(zone-bypass.pdf)
'TOP-SECRET-INTERNAL-TOKEN-9c41ab'Three things were controlled before any result was recorded. The internal service is genuinely loopback-only: `curl http://127.0.0.1:9999/x` inside the container returns the token, and the same port from the host is refused. The `fec0` listener is genuinely reachable from the Gotenberg container. And the dial primitive itself was checked — a Go program on the same network connects to `[fec0:1234::3]:8080`, `[…%251]`, `[…%1]`, `[…%eth0]` and `[…%0]` alike, while a dead control at `192.0.2.77:8080` times out. An arbitrary, even nonsensical, zone does not change where the packet goes — which is why the guard's blindness to it is exploitable rather than academic.
The bare spellings use the identical code path and are refused, so the harness opens nothing the product did not already have.
The webhook route is reachable the same way; the proof there is that Gotenberg logged our own listener's `501 Unsupported method ('POST')`.
Affected range
`v8.31.0` through `v8.37.0`, established by running the reproduction against eight released images rather than by reading the changelog. `v8.30.1` has no such predicate at all.
The `IsUnspecified` half has been present since `v8.31.0`. The prefix-loop half dates from the CVE-2026-45741 fix, so that half is as old as the fix itself.
Impact
An unauthenticated client of the conversion API causes Gotenberg to fetch an arbitrary internal address and returns the content rendered into a PDF it downloads — so this is a read primitive, not a blind one, as the extracted token above shows.
For `v8.32.0` and later the bypassed control is opt-in (`API_DOWNLOAD_FROM_DENY_PRIVATE_IPS`, default off); on `v8.31.0` it was unconditional. We note this rather than argue it: CVE-2026-45741's own range spanned both regimes and you rated it `high`.
Suggested fix
Normalise the zone away before classifying, once, at the top of `IsPublicIP`:
addr = addr.Unmap()
if addr.Zone() != "" {
addr = addr.WithZone("")
}`Unmap()` is already there and handles the v4-mapped case; this is the same shape for zones, and it fixes both halves at once — the `switch` and both prefix loops — rather than patching `IsUnspecified` and leaving the loops.
Worth considering alongside, and we raise it rather than assert it: a zone identifier in a URL host is only meaningful for link-local destinations, and nothing Gotenberg legitimately fetches needs one. Rejecting a host that carries one at the parse step would close the class rather than this instance.
Severity
`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N` — 7.5 High.
This is your own vector for CVE-2026-45741, the advisory this is an incomplete fix of, copied unchanged.
One honest note rather than an argument. Your `AC:H` there was justified by the attacker needing a NAT64 or 6to4 route, or a DNS record. This bypass needs neither — any zone suffix works, including a nonsensical one, as the dial control above shows. On the facts `AC:L` is the correct metric and gives 9.3. We are deliberately not proposing it, because you have never rated this class above `high` and consistency with your own scoring is worth more to us than a higher number. If you conclude `AC:L` is right, that is your call to make.
Recorded, not claimed
Three adjacent hunts came back negative and we report them so you need not repeat them.
The ExifTool tag blocklist holds: `File_Name`, `File-Name`, `FileName-=`, `userparam` and `TestName` were all tested against real exiftool 13.25, with rename and refusal controls, and none bypasses. DNS rebinding is closed — pinning is complete, consistent with CVE-2026-42592. The LibreOffice route is inert at this version; that conclusion is only sayable because a control run showed 3 hits on `8.33.0` against 0 on `8.37.0`, and our first probe there had no control at all. The Chromium `url=` route bypasses the guard but Chromium itself refuses the URL, so there is no impact to claim.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/gotenberg/gotenberg/v8 |
Corregida | v8.38.0 | -29 d | v8.40.0 no afectada |
8.38.0v8.38.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/gotenberg/gotenberg/security/advisories/GHSA-fqg9-x2xw-5crxLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
