llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · guzzlehttp/guzzle

GHSA-HPVQ-6RRX-PC47

Malformed bracketed host can bypass host-based checks in guzzlehttp/guzzle

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión7.16.3
Exposición4 dDesde la divulgación, 17 nov 2026, 11:27 a. m.
Detección1 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.
Parche en la próxima ventana y listo, campeón.Esto lo arregla la rutina de siempre.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
17 nov 26
18 nov 26
21 nov 26
17 nov 26
18 nov 26
19 nov 26
20 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HPVQ-6RRX-PC47 divulgada · CVSS 5.4 (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

In affected versions, the request host validation added for GHSA-v5mv-p594-2x33 accepts a bracketed URI host that is not an IP literal, such as `[::1]:8080]`, `[127.0.0.1]` or `[localhost]`. `StreamHandler` passes the URI to PHP as text, and PHP connects to the text inside the first pair of brackets, on the port written after them if there is one, whatever `Uri::getHost()` and `Uri::getPort()` report. The issue is fixed in `7.16.3`.

Details

GHSA-v5mv-p594-2x33 listed unbalanced brackets among the hosts that the built-in handlers reject since `7.15.2`, but on the 7 line that check only requires a host that contains a bracket to begin with `[` and end with `]`. `guzzlehttp/psr7` before `2.13.4` reports the host `[::1]:8080]` for `http://user@[::1]:8080]:80/` and for the network-path reference `//[::1]:8080]:80/`, which a redirect `Location` can carry too, and `Uri::withHost()` and other PSR-7 implementations supply bracketed hosts directly.

PHP's stream transport reads `[::1]:8080]` as host `::1`, port `8080`, and connects to `[127.0.0.1]` and `[localhost]` as `127.0.0.1` and `localhost`. Through the cURL handlers, libcurl `7.52.1` also connects to the inner host and port, `7.52.1`, `7.61.1` and `7.64.0` connect to a bracketed IPv4 address, and `7.74.0` and `8.14.1` reject all of these hosts.

This is a summary; the patches are the authority. The issue is fixed in `7.16.3`, which rejects a request URI host containing a bracket unless it is a bracketed IPv6 or IPvFuture literal, the rule Guzzle 8 applies. `guzzlehttp/psr7` `2.13.4` (GHSA-jwvc-hj95-82hh) rejects a host that continues after its closing bracket but still holds `[127.0.0.1]` and `[localhost]`, so it does not replace this release. One case stays open on `7.16.3` and on Guzzle 8: an IPvFuture literal such as `[v1.example]` is a valid URI host, and the stream handler resolves `v1.example` as a name. Guzzle 8 is not affected, because it already has stronger input validation, introduced as part of a breaking change: every `8.x` release requires `guzzlehttp/psr7` 3, whose `Uri` accepts a bracketed host only if it is an IPv6 or IPvFuture literal, and since `8.0.1` the handlers apply the same rule to every PSR-7 implementation. Versions before `7.16.3` are affected. Versions before `7.15.2` are also covered by GHSA-v5mv-p594-2x33, as is `8.0.0`, the one Guzzle 8 release whose handlers validate no hosts.

Proof of concept

A vulnerable flow, reproduced over a real socket on `7.15.2` and `7.16.2`, is:

  1. An application checks the host or port of an untrusted URL before fetching it: it refuses loopback and private addresses, for example, or allows only ports 80 and 443.
  2. It sends the request through `StreamHandler`: the cURL extension is unavailable, the handler is configured explicitly, or the request uses the `stream` option, which the default handler stack routes to it even when cURL is installed.
  3. The attacker supplies `http://user@[127.0.0.1]:6379]:80/`.
  4. `Uri::getHost()` returns `[127.0.0.1]:6379]` and `Uri::getPort()` returns `null`. The host is not an IP address, and the port appears to be the default.
  5. The stream handler connects to `127.0.0.1` on port `6379` and sends the request with `Host: [127.0.0.1]:6379]`.
Impact

An attacker who influences a fetched URI or a redirect target can reach a host or a port that the application's own check excluded, and read whatever the application exposes of the response. The checks concerned are denylists, private-range and IP-literal checks, as in GHSA-v5mv-p594-2x33, and also a port restriction that reads `Uri::getPort()`.

Exploitation requires the application to build a request URI from untrusted input, to make a host or port decision before handing it to Guzzle, and to send the request through the stream handler or with a libcurl as old as described above. Applications that only fetch URIs they construct themselves are not affected, and an exact allowlist of hosts fails closed.

If you cannot upgrade, reject a request URI whose host contains `[` or `]` unless the text between one leading `[` and one trailing `]` passes `filter_var()` with `FILTER_VALIDATE_IP` and `FILTER_FLAG_IPV6`, before handing the URI to Guzzle and on every redirect hop.

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:L
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
guzzlehttp/guzzle< 7.16.3
7.16.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistguzzlehttp/guzzle
Corregida 7.16.3 — —
Versiones corregidas7.16.3
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/guzzle/guzzle/security/advisories/GHSA-hpvq-6rrx-pc47

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