guzzlehttp/psr7 security advisory
CVE-2026-59882: Guzzlehttp/psr7: Host Confusion via Weak URI Host Validation
CVE-2026-59882 is a medium-severity security vulnerability in the PHP package guzzlehttp/psr7 (CVSS 6.5), published 8 July 2026. It is fixed in 2.12.3; earlier versions are affected. It can be exploited without an account.
medium 6.5 published 2026-07-08 · updated 2026-10-25
- Affected versions
- < 2.12.3
- Fixed in
- 2.12.3
- Newest release
- 3.2.0
- Severity
- Medium · CVSS 6.5
- Type
- Security issue
CWE-436 - 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-59882
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by NVD): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
How to fix CVE-2026-59882 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.12.3 or newer. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"guzzlehttp/psr7": "^2.12.3"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-59882. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-59882 advisory
guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Prior to 2.12.3, Uri::assertValidHost() does not reject URI host components containing authority delimiters, embedded ports, or malformed IPv6 brackets, allowing Uri::getHost() to disagree with the URI authority used for security or routing decisions. This issue is fixed in version 2.12.3.
References
- GitHub advisory GHSA-c2w2-prh8-qm98 github.com
- Fix commit ddd64f1 github.com
- Pull request #811 github.com
- Release 2.12.3 github.com
Other guzzlehttp/psr7 advisories
- medium CVE-2026-55766: CRLF injection in HTTP start-line serialization 2026-06-18
- medium CVE-2026-48998: Host confusion via authority reinterpretation 2026-05-25
- 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.