Junglewise Threat Intelligence

CVE-2026-59882: Guzzle PSR-7 host confusion via weak URI host validation

CVE-2026-59882 · Severity: medium · CVSS 4.2 · Published 2026-07-08

Technologies: GuzzleHttp Psr7, guzzlehttp/psr7 (Packagist). Vendors: GuzzleHttp, Packagist.

Executive brief

A vulnerability in the Guzzle PSR-7 library, a common tool for handling web requests in PHP, could allow attackers to bypass security filters. By providing specially crafted web addresses (URIs), an attacker can trick the software into connecting to a different server than the one it thinks it is communicating with. This could lead to unauthorized data access, bypass of security blocklists, or internal network scanning.

Technical details

Guzzle PSR-7 fails to properly validate URI host components, accepting malformed hosts containing authority delimiters (/, ?, #, @, or \), embedded ports, or unbalanced IPv6 brackets. The `Uri::assertValidHost()` method only rejected control characters, causing `Uri::getHost()` to return values that differ from the actual connection target used by downstream HTTP components. An attacker can exploit this interpretation conflict to bypass host-based security checks, such as SSRF guards, cookie scoping, or proxy-bypass lists. The issue is resolved in version 2.12.3 by enforcing stricter validation during URI parsing and modification.

Affected products

  • guzzlehttp psr7 < 2.12.3

Timeline

  • 2026-06-23: disclosed
  • 2026-06-23: patched: Version 2.12.3 released
  • 2026-07-08: kev added: NVD publication date
  • 2026-07-21: advisory

References

Related threats