CVE-2026-48998: guzzlehttp/psr7 has Host Confusion via Authority Reinterpretation

Published Jun 11, 2026
·
Updated

Impact

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.

A vulnerable flow is:

1. An attacker controls a raw HTTP request or server variable containing a Host value. 2. The Host value contains URI authority delimiters, such as trusted.example@evil.example. 3. guzzlehttp/psr7 uses that value to construct a URI. 4. The URI parser treats the portion before @ as userinfo and the portion after @ as the URI host. 5. The resulting PSR-7 request URI host differs from the original Host header value.

For 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.

Applications are affected if they parse attacker-controlled raw HTTP requests with GuzzleHttp\Psr7\Message::parseRequest() or the legacy 1.x GuzzleHttp\Psr7\parserequest() 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.

Patches

The issue is patched in 2.10.2 and later. 1.x is end-of-life and will not receive a patch.

Workarounds

If you cannot upgrade immediately, validate Host values before passing untrusted request data to Message::parseRequest(), legacy 1.x parserequest(), ServerRequest::fromGlobals(), or ServerRequest::getUriFromGlobals().

Accept 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.

Do not validate Host by prefixing it with http:// and passing it to parseurl(), because that can reinterpret malformed values as URI userinfo and host.

References

https://www.rfc-editor.org/rfc/rfc9112.html#section-3.2 https://www.rfc-editor.org/rfc/rfc9112.html#section-3.3 https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2.4 https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2

Other sources

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\parserequest() 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 parserequest() 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.

MITRE

Affected Software

3 affected componentsFixes available
packagist/guzzlehttp/psr7<2.10.2
composer/guzzlehttp/psr7<2.10.2
2.10.2
Guzzlephp Psr-7<2.10.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/guzzlehttp/psr7 to a version that resolves this vulnerability.

    Fixed in 2.10.2
  2. Remove

    Remove composer/guzzlehttp/psr7 1.x from your environment.

    Remove or stop using guzzlehttp/psr7 1.x (end-of-life, will not receive a patch). Migrate to a supported release such as 2.10.2.

  3. Configuration

    Before calling Message::parseRequest(), legacy parse_request(), ServerRequest::fromGlobals(), or ServerRequest::getUriFromGlobals() on untrusted input, validate the Host header to ensure it is strictly an 'uri-host' optionally followed by ':port' and reject any value containing userinfo, path, query, fragment delimiters, whitespace, control characters, malformed IP/bracket syntax, or invalid port syntax. Do not validate Host by prefixing with 'http://' and using parse_url(), as that can reinterpret malformed values into userinfo and host.

    guzzlehttp/psr7 request parsing Host header validation = uri-host[:port] — reject values with whitespace, control characters, userinfo (@), path (/ or \), query (?), fragment (#), malformed IP literals/bracket syntax, or invalid port syntax
  4. Compensating control

    If you cannot upgrade immediately, enforce Host header validation at the edge (WAF, reverse proxy, or load balancer) to accept only 'uri-host[:port]' and reject requests whose Host contains '@', '/', '\\', '?', '#', whitespace, control characters, malformed IP/bracket syntax, or invalid port syntax so malformed Host values do not reach guzzlehttp/psr7.

Event History

Jun 11, 2026
CVE Published
via MITRE·12:34 PM
Data Sourced
via MITRE·12:34 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·01:04 PM
Data Sourced
via GitHub·01:04 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·01:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-48998?

CVE-2026-48998 has a medium severity rating of 5.3.

2

What does CVE-2026-48998 vulnerability affect?

CVE-2026-48998 affects the guzzlehttp/psr7 library in versions prior to 2.10.2.

3

How do I fix CVE-2026-48998?

To fix CVE-2026-48998, update guzzlehttp/psr7 to version 2.10.2 or later.

4

What type of attack is associated with CVE-2026-48998?

CVE-2026-48998 is associated with SSRF due to improper Host header validation.

5

What impact does CVE-2026-48998 have?

CVE-2026-48998 can result in host confusion, potentially leading to security vulnerabilities.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203