MEDIUM 5.3

CVE-2026-48998: guzzlehttp/psr7 Host Header Validation Bypass (CVSS 5.3)

A library used by PHP developers to handle HTTP messages (guzzlehttp/psr7) has a flaw in how it validates the Host header when processing HTTP requests. An attacker can craft a malicious Host header that tricks the library into misidentifying which server the request is intended for. For example, an attacker could use a Host header like `[email protected]` which the library might interpret as being meant for `evil.example` rather than `trusted.example`. This matters most if your application relies on the Host header to decide where to route requests or whether to trust them. In worst-case scenarios—particularly for API gateways, proxies, or request forwarding services—this could lead to sensitive requests or credentials being sent to an attacker's server instead of the intended destination.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Weaknesses (CWE)
CWE-20, CWE-918
Affected products
1 configuration(s)
Published / Modified
2026-06-11 / 2026-06-17

NVD description (verbatim)

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 `[email protected]`. 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.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-48998 involves improper validation of the Host header in guzzlehttp/psr7 versions before 2.10.2. When parsing raw HTTP request messages via `GuzzleHttp\Psr7\Message::parseRequest()` or the legacy `parse_request()` function, or when constructing server requests from untrusted server variables, the library fails to reject Host headers containing URI authority delimiters (specifically userinfo markers such as `@`). This allows an attacker-controlled Host header to be reinterpreted during URI construction: the substring before the delimiter may be treated as userinfo rather than a hostname component, causing the derived URI host to diverge from the original Host header value. The vulnerability is rooted in CWE-20 (improper input validation) and CWE-918 (server-side request forgery), though the latter applies when the misrouted request reaches an external destination.

Business impact

Applications most at risk are those that use guzzlehttp/psr7 to parse untrusted HTTP request data or build server requests from user-supplied variables, then depend on the resulting URI host for security decisions. High-risk scenarios include: API gateways or reverse proxies that forward requests based on the Host header; microservice routing that relies on parsed Host values for access control; and forwarding proxies or load balancers that need to route to the correct backend. A successful exploit could result in credential leakage (if the application forwards authentication tokens to the wrong host), unauthorized access to internal or partner services (via SSRF-like behavior), or cache poisoning if the application caches responses keyed by Host. The impact is most severe in infrastructure and integration layers rather than monolithic applications.

Affected systems

Any PHP application using guzzlehttp/psr7 versions prior to 2.10.2 is affected if it processes attacker-controlled HTTP requests or server variables and makes routing or security decisions based on the parsed Host. Version 1.x of guzzlehttp/psr7 is end-of-life and will not receive a patch, leaving those users to implement workarounds. Applications using only the library for client-side HTTP requests (outbound calls) are at lower risk unless they also parse inbound requests.

Exploitability

The vulnerability has a CVSS 3.1 score of 5.3 (MEDIUM severity) with a network-based, unauthenticated attack vector requiring no user interaction. This reflects the straightforward nature of the exploit: an attacker simply needs to send a malformed Host header to an affected application. However, exploitation impact depends on application architecture. Applications that blindly trust the parsed Host for routing or forwarding are vulnerable immediately; those with additional validation layers (e.g., DNS resolution, certificate pinning, or allow-list enforcement) may be partially protected. The vulnerability is not currently listed on CISA's Known Exploited Vulnerabilities catalog.

Remediation

Upgrade guzzlehttp/psr7 to version 2.10.2 or later. Applications on version 1.x must either migrate to version 2.x (which will be updated) or implement the recommended workaround: validate the Host header as a valid `uri-host` optionally followed by a port before passing raw requests to `Message::parseRequest()` or `parse_request()`. Specifically, reject any Host value containing userinfo delimiters (`@`), path delimiters (`/`), query delimiters (`?`), or fragment delimiters (`#`). This validation should occur before the Host is used for any routing, allow-listing, or forwarding decision.

Patch guidance

Update guzzlehttp/psr7 to version 2.10.2 via Composer: `composer update guzzlehttp/psr7`. Verify the update in your lock file. If you are on version 1.x, evaluate the effort and risk of upgrading to 2.x versus implementing host-header validation as a workaround. Test the patch in a staging environment to ensure no legitimate requests (e.g., with unusual but valid Host formats) are rejected by your application's Host validation logic.

Detection guidance

Monitor application logs and HTTP request logs for Host headers containing the `@` character, especially in patterns like `hostname@otherhostname`. If your application runs behind a proxy or load balancer, check upstream logs as well. Review routing and forwarding decisions to see if any requests have been sent to unexpected destinations. Inspect API gateway and reverse-proxy configurations to confirm they do not rely solely on the Host header without additional validation. If you parse raw HTTP requests, audit code paths that use `Message::parseRequest()` or `parse_request()` on untrusted input.

Why prioritize this

This vulnerability should be prioritized if your organization operates API gateways, reverse proxies, microservice routers, or other forwarding infrastructure that depends on the Host header for routing decisions. It is also relevant if you accept raw HTTP requests from untrusted sources. The MEDIUM CVSS score reflects the need for specific application patterns to be exploitable, but the potential impact in infrastructure contexts justifies prompt patching. Organizations running stateless, single-tenant, or client-only HTTP applications may deprioritize this, but should still patch as part of routine maintenance.

Risk score, explained

The CVSS 3.1 base score of 5.3 (MEDIUM) is driven by a network-based attack vector with low complexity and no privileges or user interaction required (AV:N/AC:L/PR:N/UI:N). The impact vector (S:U/C:L/I:N/A:N) indicates low confidentiality impact (credentials or sensitive data may be leaked) with no integrity or availability impact. The score reflects the fact that exploitation depends on the application's trust model and architecture, not on the vulnerability being universally exploitable. High-risk deployments (gateways, proxies) should treat this as higher priority despite the MEDIUM baseline.

Frequently asked questions

Does this affect applications that only use guzzlehttp/psr7 for outbound client requests?

Primarily, no. The vulnerability requires parsing untrusted inbound HTTP request data or server variables. Applications that use guzzlehttp/psr7 solely to construct and send outbound HTTP requests are not at direct risk. However, if your application also accepts inbound requests and uses the same library to parse them, you are affected.

What versions are vulnerable?

guzzlehttp/psr7 versions prior to 2.10.2 are vulnerable. Version 1.x is end-of-life and will not receive a patch; you must upgrade to 2.10.2+ or implement the Host-header validation workaround.

Can I avoid this without upgrading if my application does additional validation?

Yes, partially. If you validate the Host header as a well-formed `uri-host` and port (rejecting any string containing `@`, `/`, `?`, or `#`) before calling `Message::parseRequest()` or deriving routing decisions, you can mitigate the risk while upgrading. This is the recommended workaround for version 1.x users.

Is this exploited in the wild?

As of the publication date, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog. However, the simplicity of crafting a malformed Host header means you should not delay patching.

This analysis is current as of the publication date and based on vendor-supplied information. The example Host header format and attack scenario are illustrative; actual exploitation may vary depending on application logic and configuration. Verify patch version numbers and compatibility against official vendor advisories before deploying. This vulnerability analysis does not constitute legal or compliance advice. Organizations should assess this vulnerability against their own risk tolerance, architecture, and regulatory requirements. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).