Skip to main content

guzzlehttp/psr7 CVE-2026-59882

| EUVDEUVD-2026-42319 MEDIUM
Interpretation Conflict (CWE-436)
2026-07-08 GitHub_M GHSA-c2w2-prh8-qm98
6.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted URI with malformed host to application endpoint
  2. Delivery
    Uri::assertValidHost() accepts authority-delimiter-embedded host
  3. Exploit
    Uri::getHost() returns sanitized host fragment
  4. Execution
    Application security check passes against allowlist
  5. Persist
    HTTP client routes request using full URI authority
  6. Impact
    Internal or restricted service responds to attacker-influenced request

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V4 - API and Web Service Interpretation consistency
Exploitation Conditions

Exploitation requires two concurrent conditions: first, the target application must run guzzlehttp/psr7 prior to version 2.12.3; second, the application must use Uri::getHost() output - directly or indirectly - to make a security-relevant decision such as SSRF allowlist enforcement, host-based routing, or access policy validation. Applications that ingest user-supplied URI strings are the primary attack surface; if external input cannot influence the URI being parsed, the vulnerability is not reachable. The CVSS AC:H metric confirms that exploitation is not straightforward - the attacker must construct a host string that passes assertValidHost() but produces a deceptive getHost() return value, and the consuming application must use that return value in a security context. Applications that process URIs exclusively for non-security purposes (logging, display, metrics tagging) are not meaningfully at risk even on a vulnerable version.

Impact

The CVSS 3.1 base score of 4.2 (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N) correctly captures network reachability with meaningful constraints: AC:H reflects that exploitation depends on specific URI construction and application usage patterns, and UI:R suggests a user or upstream component must process the crafted URI. The limited C:L/I:L impact scores align with SSRF-class outcomes - internal service exposure and redirected requests - rather than full compromise. No CISA KEV listing and no public POC have been identified, making active exploitation unconfirmed. EPSS data is absent from the provided intelligence. Real-world risk is strongly context-dependent: applications using getHost() as a security gate (SSRF filters, host allowlists, proxy routing) face meaningful exploitation potential, while applications that use the value only for logging or display are functionally unexposed regardless of the CVSS score. The AC:H signal should not be read as low-risk - the required conditions (URI-accepting endpoints with host-based security decisions) are extremely common in PHP microservice and API-gateway architectures.

Exploit ScenarioDerived

An attacker targeting a PHP application that uses guzzlehttp/psr7 to enforce an SSRF allowlist (e.g., permitting requests only to 'api.trusted.com') submits a crafted URL such as 'http://api.trusted.com@internal-service.corp/secret' to an endpoint that accepts user-supplied URLs. Uri::assertValidHost() accepts 'api.trusted.com@internal-service.corp' as valid, getHost() returns 'api.trusted.com' which passes the allowlist check, but the HTTP client routes the actual request to 'internal-service.corp', exposing internal services. No public exploit code has been identified at time of analysis, though the technique is consistent with well-documented URI parsing desync research.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Host validation bypass in guzzlehttp/psr7 before 2.12.3 enables URI authority confusion attacks against PHP applications that rely on Uri::getHost() for security-critical decisions. The Uri::assertValidHost() method accepts host strings containing authority delimiters, embedded ports, or malformed IPv6 brackets, causing a semantic split where getHost() returns a sanitized value that disagrees with the actual URI authority used for routing - a classic CWE-436 interpretation conflict exploitable for SSRF allowlist bypass or host-based access control evasion. No public exploit has been identified at time of analysis; vendor-released patch version 2.12.3 resolves the issue.

RemediationAI

Upgrade guzzlehttp/psr7 to version 2.12.3 or later using Composer: run 'composer require guzzlehttp/psr7:^2.12.3' and verify the resolved version with 'composer show guzzlehttp/psr7'. The patch is confirmed in release 2.12.3 per the GitHub release tag (https://github.com/guzzle/psr7/releases/tag/2.12.3) and advisory GHSA-c2w2-prh8-qm98. If an immediate upgrade is blocked by dependency constraints, implement an independent host validation layer at the application boundary: after calling getHost(), also extract and parse the raw URI authority string directly and compare both values - reject any URI where they disagree. This workaround adds code complexity and is brittle against future URI edge cases; treat it as a temporary bridge only. Additionally, audit all application code paths that pass user-supplied URLs to guzzlehttp/psr7 Uri objects and enforce allowlists against the raw authority rather than solely against getHost() output until the upgrade is applied.

Affected VersionsENISA

psr7 < 2.12.3

Affected Packages

composer guzzlehttp/psr7 fix: 2.12.3
euvd psr7 fix: 2.12.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-436 (Interpretation Conflict) describes vulnerabilities arising when two components parse the same input and reach different conclusions, creating a semantic gap. In guzzlehttp/psr7, the PSR-7 HTTP message interface implementation for PHP, the Uri class is responsible for parsing RFC 3986 URI components. The defect is in Uri::assertValidHost(), which acts as a gatekeeper before values are stored and later returned by getHost(). By permitting host strings such as 'trusted.com@attacker.com', 'trusted.com:8080', or '[::1' (malformed IPv6 bracket), the stored 'host' value diverges from what the URI authority actually encodes. Downstream code relying on getHost() for security decisions - SSRF protection, request routing, allowlist enforcement - operates on the sanitized fragment rather than the full authority, bypassing the intended control. The CPE cpe:2.3:a:guzzle:psr7:*:*:*:*:*:*:*:* covers all prior versions. The fix is in commit ddd64f17d4cc1f7e5ffe6fd2c989ec7221712580 (PR #811).

Know when Psr7 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY MEDIUM
NVD 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 4.8 MEDIUM

UI:N reassigned from provided vector - SSRF bypass via crafted URI requires no human interaction, only attacker-controlled input to an API endpoint; AC:H and C:L/I:L retained as appropriate for host-parsing desync with conditional exploitability.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
CVSS changed
Jul 17, 2026 - 14:37 NVD
4.2 (MEDIUM) 6.5 (MEDIUM)
Patch available
Jul 08, 2026 - 18:02 EUVD

DescriptionNVD

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
top PHP HTTP library, billions of Packagist downloads, ubiquitous transitive dependency
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy