Skip to content
Laskyr

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

Fixed in guzzlehttp/psr7 2.12.3

This security issue affects guzzlehttp/psr7 versions < 2.12.3. Upgrade to the fixed version for your release line (2.12.3). The newest release, 3.2.0, is not affected.

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?

Run composer show guzzlehttp/psr7 in your project, then enter the version. We check it against this and every other known guzzlehttp/psr7 advisory.

Who can exploit CVE-2026-59882

CVSS vector (scored by NVD): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Your app is only exposed if it uses the affected part of guzzlehttp/psr7. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-59882 in guzzlehttp/psr7

  1. Find the installed version: composer show guzzlehttp/psr7. If you never required it yourself, composer why guzzlehttp/psr7 shows which package pulls it in.
  2. Update it: composer update guzzlehttp/psr7 --with-all-dependencies. You need 2.12.3 or newer.
  3. 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.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-59882.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for this kind of issue while the upgrade waits. None of it replaces the fix.

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.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-59882. Advisory title: “guzzlehttp/psr7: Host Confusion via Weak URI Host Validation”.

References

Other guzzlehttp/psr7 advisories

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 fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit