guzzlehttp/psr7 security advisory
CVE-2026-48998: Host confusion via authority reinterpretation in guzzlehttp/psr7
CVE-2026-48998 is a medium-severity SSRF vulnerability in the PHP package guzzlehttp/psr7 (CVSS 5.3), published 11 June 2026. It is fixed in 2.10.2; earlier versions are affected. It can be exploited without an account.
medium 5.3 published 2026-06-11 · updated 2026-10-26
- Affected versions
- < 2.10.2
- Fixed in
- 2.10.2
- Newest release
- 3.2.0
- Severity
- Medium · CVSS 5.3
- Type
- Server-side request forgery (SSRF)
CWE-20, CWE-918 - Exploited in the wild
- Not on the CISA KEV list
checked 2026-11-04
Is your guzzlehttp/psr7 version affected?
Who can exploit CVE-2026-48998
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by GitHub): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
How to fix CVE-2026-48998 in guzzlehttp/psr7
- Find the installed version:
composer show guzzlehttp/psr7. If you never required it yourself,composer why guzzlehttp/psr7shows which package pulls it in. - Update it:
composer update guzzlehttp/psr7 --with-all-dependencies. You need 2.10.2 or newer. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"guzzlehttp/psr7": "^2.10.2"if you can take that version), or upgrade the package that requires it. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-48998. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
The advisory gives this workaround:
Some workarounds are available.
- Block outbound requests from the app server to private ranges and cloud metadata (169.254.169.254) at the firewall.
- Do not pass user-supplied URLs to the affected feature.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-48998 advisory
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.
References
- GitHub security advisory GHSA-34xg-wgjx-8xph github.com
Other guzzlehttp/psr7 advisories
- medium CVE-2026-59882: Guzzlehttp/psr7: Host Confusion via Weak URI Host Validation 2026-07-21
- medium CVE-2026-55766: CRLF injection in HTTP start-line serialization 2026-06-18
- medium CVE-2026-49214: CRLF injection via URI host component 2026-05-25
- medium CVE-2023-29197: Improper header validation 2023-04-17
- medium CVE-2022-24775: Inproper parsing of HTTP headers 2022-03-20
Related
Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.
Ask about a fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.