{"id":"CVE-2026-48998","aliases":["CVE-2026-48998","GHSA-34xg-wgjx-8xph"],"related":[],"kind":"vulnerability","state":"published","title":"guzzlehttp/psr7 has Host Confusion via Authority Reinterpretation","summary":"guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Versions prior to 2.10.2 contain improper Host header validation when parsing raw HTTP request messages and when deriving a server request URI from server variables. An attacker can provide a malformed Host header containing URI authority delimiters, such as `trusted.example@evil.example`. When the Host value is used to construct a URI, the malformed value can be reinterpreted as URI userinfo and host. This can cause the PSR-7 request URI host to differ from the original Host header value. Applications are affected if they parse attacker-controlled raw HTTP requests with `GuzzleHttp\\Psr7\\Message::parseRequest()` or the legacy 1.x `GuzzleHttp\\Psr7\\parse_request()` function, or if they build server requests from attacker-controlled server variables, then rely on the resulting URI host for routing, allow-list checks, or forwarding decisions. In affected forwarding or gateway scenarios, this may cause requests or credentials to be sent to an unintended host. The issue is patched in `2.10.2`. `1.x` is end-of-life and will not receive a patch. Some workarounds are available. Validate the `Host` header as `uri-host [ \":\" port ]` before calling `Message::parseRequest()` or legacy `parse_request()` on untrusted HTTP request data, or before deriving routing and forwarding decisions from a parsed request URI. Reject Host values containing userinfo, path, query, or fragment delimiters.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Versions prior to 2.10.2 contain improper Host header validation when parsing raw HTTP request messages and when deriving a server request URI from server variables. An attacker can provide a malformed Host header containing URI authority delimiters, such as `trusted.example@evil.example`. When the Host value is used to construct a URI, the malformed value can be reinterpreted as URI userinfo and host. This can cause the PSR-7 request URI host to differ from the original Host header value. Applications are affected if they parse attacker-controlled raw HTTP requests with `GuzzleHttp\\Psr7\\Message::parseRequest()` or the legacy 1.x `GuzzleHttp\\Psr7\\parse_request()` function, or if they build server requests from attacker-controlled server variables, then rely on the resulting URI host for routing, allow-list checks, or forwarding decisions. In affected forwarding or gateway scenarios, this may cause requests or credentials to be sent to an unintended host. The issue is patched in `2.10.2`. `1.x` is end-of-life and will not receive a patch. Some workarounds are available. Validate the `Host` header as `uri-host [ \":\" port ]` before calling `Message::parseRequest()` or legacy `parse_request()` on untrusted HTTP request data, or before deriving routing and forwarding decisions from a parsed request URI. Reject Host values containing userinfo, path, query, or fragment delimiters.","source":"cvelist"},{"lang":"en","text":"## Impact\n\n`guzzlehttp/psr7` improperly interpreted malformed `Host` header values when constructing request URIs from inbound request data. This issue concerns inbound request parsing and server request construction. It does not require serializing a PSR-7 request, and it is not part of the normal outbound request-sending path used by `guzzlehttp/guzzle`.\n\nA vulnerable flow is:\n\n1. An attacker controls a raw HTTP request or server variable containing a `Host` value.\n2. The `Host` value contains URI authority delimiters, such as `trusted.example@evil.example`.\n3. `guzzlehttp/psr7` uses that value to construct a URI.\n4. The URI parser treats the portion before `@` as userinfo and the portion after `@` as the URI host.\n5. The resulting PSR-7 request URI host differs from the original `Host` header value.\n\nFor example, `Host: trusted.example@evil.example` can result in a PSR-7 URI whose host is `evil.example`, while the original Host header value remains `trusted.example@evil.example`.\n\nApplications are affected if they parse attacker-controlled raw HTTP requests with `GuzzleHttp\\Psr7\\Message::parseRequest()` or the legacy 1.x `GuzzleHttp\\Psr7\\parse_request()` function, or if they build server requests from attacker-controlled server variables with `GuzzleHttp\\Psr7\\ServerRequest::fromGlobals()` or `GuzzleHttp\\Psr7\\ServerRequest::getUriFromGlobals()`, and then rely on the resulting URI host for routing, allow-list checks, credential selection, or forwarding decisions. Applications using `guzzlehttp/psr7` only through Guzzle's standard HTTP client APIs are not expected to be affected. In affected forwarding or gateway scenarios, this may cause requests or credentials to be sent to an unintended host.\n\n## Patches\n\nThe issue is patched in `2.10.2` and later. `1.x` is end-of-life and will not receive a patch.\n\n## Workarounds\n\nIf you cannot upgrade immediately, validate Host values before passing untrusted request data to `Message::parseRequest()`, legacy 1.x `parse_request()`, `ServerRequest::fromGlobals()`, or `ServerRequest::getUriFromGlobals()`.\n\nAccept only `uri-host [ \":\" port ]`. Reject values containing whitespace, control characters, userinfo (`@`), path (`/` or `\\`), query (`?`), fragment (`#`), malformed IP literals or bracket syntax, or invalid port syntax.\n\nDo not validate Host by prefixing it with `http://` and passing it to `parse_url()`, because that can reinterpret malformed values as URI userinfo and host.\n\n## References\n\n* https://www.rfc-editor.org/rfc/rfc9112.html#section-3.2\n* https://www.rfc-editor.org/rfc/rfc9112.html#section-3.3\n* https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2.4\n* https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2","format":"markdown","source":"ghsa"},{"lang":"es","text":"guzzlehttp/psr7 es una implementación de la biblioteca de mensajes HTTP PSR-7 en PHP. Las versiones anteriores a la 2.10.2 contienen una validación incorrecta del encabezado Host al analizar mensajes de solicitud HTTP sin procesar y al derivar una URI de solicitud del servidor a partir de variables del servidor. Un atacante puede proporcionar un encabezado Host malformado que contenga delimitadores de autoridad de URI, como ’trusted.example@evil.example’. Cuando el valor de Host se utiliza para construir una URI, el valor malformado puede ser reinterpretado como información de usuario y host de la URI. Esto puede hacer que el host de la URI de solicitud PSR-7 difiera del valor original del encabezado Host. Las aplicaciones se ven afectadas si analizan solicitudes HTTP sin procesar controladas por un atacante con ’GuzzleHttp\\Psr7\\Message::parseRequest()’ o la función heredada 1.x ’GuzzleHttp\\Psr7\\parse_request()’, o si construyen solicitudes de servidor a partir de variables de servidor controladas por un atacante, y luego dependen del host de la URI resultante para el enrutamiento, las comprobaciones de lista de permitidos o las decisiones de reenvío. En escenarios de reenvío o de pasarela afectados, esto puede hacer que las solicitudes o credenciales se envíen a un host no deseado. El problema está parcheado en ’2.10.2’. ’1.x’ ha llegado al fin de su vida útil y no recibirá un parche. Algunas soluciones alternativas están disponibles. Valide el encabezado ’Host’ como ’uri-host [ ’:’ puerto ]’ antes de llamar a ’Message::parseRequest()’ o a la función heredada ’parse_request()’ en datos de solicitud HTTP no confiables, o antes de derivar decisiones de enrutamiento y reenvío de una URI de solicitud analizada. Rechace los valores de Host que contengan delimitadores de información de usuario, ruta, consulta o fragmento.","source":"nvd"}],"published":"2026-06-11T12:34:32.397Z","modified":"2026-10-26T11:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-918"],"affected":[{"ranges":[{"version":"< 2.10.2","status":"affected"}],"vendor":"guzzle","product":"psr7","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.10.2"}],"ecosystem":"Packagist","package":"guzzlehttp/psr7","purl":"pkg:composer/guzzlehttp/psr7","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.10.2"}],"vendor":"guzzlephp","product":"psr-7","cpe":"cpe:2.3:a:guzzlephp:psr-7:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/guzzle/psr7/security/advisories/GHSA-34xg-wgjx-8xph","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48998","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/psr7/CVE-2026-48998.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/guzzle/psr7","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-06-11T16:05:39.189Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48998","url":"https://www.cve.org/CVERecord?id=CVE-2026-48998","licence":"CVE Terms of Use","modified":"2026-06-11T16:05:56.424Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-34xg-wgjx-8xph","url":"https://github.com/advisories/GHSA-34xg-wgjx-8xph","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:07.670Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48998","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48998","licence":"Public domain","modified":"2026-10-26T11:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:24.422Z","epss":{"score":0.00198,"percentile":0.10054,"date":"2026-12-01T12:00:22.000Z"}}