CVE-2026-49214: Guzzlehttp/psr7 Guzzlehttp/psr7 Has CRLF Injection Vulnerability
MODERATECVE-2026-49214 is a MODERATE (CVSS 5.3) guzzlehttp/psr7 has crlf injection vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Guzzlehttp/psr7 libraries in the Packagist ecosystem. The issue involves guzzlehttp/psr7 has crlf injection via uri host component. Remediation is available by upgrading affected packages to version 2.10.2.
CVE-2026-49214 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-49214
To remediate this vulnerability, upgrade all affected Guzzlehttp/psr7 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade guzzlehttp/psr7 to 2.10.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for guzzlehttp/psr7
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-49214, inspect your project dependencies for Guzzlehttp/psr7:
inspect dependencies for guzzlehttp/psr7
Analyze the terminal output to locate any version of Guzzlehttp/psr7 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Guzzlehttp/psr7, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49214 Affected Guzzlehttp/psr7 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
guzzlehttp/psr7
|
Packagist |
< 2.10.2
|
2.10.2
|
References
Frequently Asked Questions
What is CVE-2026-49214?
Which Guzzlehttp/psr7 versions are affected?
What version fixes CVE-2026-49214?
Is guzzlehttp/psr7 affected?
What is the CVSS score of CVE-2026-49214?
What CWE is associated with CVE-2026-49214?
How can I check Packagist dependencies for CVE-2026-49214?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hq7v-mx3g-29hw",
"modified" : "2026-07-15T21:58:03Z",
"published" : "2026-06-11T13:04:47Z",
"aliases" : [ "CVE-2026-49214" ],
"summary" : "guzzlehttp/psr7 has CRLF Injection via URI Host Component",
"details" : "## Impact\n\n`guzzlehttp/psr7` did not reject ASCII control characters, whitespace, or DEL in first-party URI host components. The issue requires a PSR-7 request to be serialized into a raw HTTP/1.x message, for example with `GuzzleHttp\\Psr7\\Message::toString()` or an equivalent custom serializer. Creating a `Uri`, `Request`, or other PSR-7 object alone is not sufficient. The malformed host must be copied into the serialized `Host` header without further validation.\n\nA vulnerable flow is:\n\n1. An application accepts a user-controlled URL.\n2. The URL is used to construct a PSR-7 `Uri` or `Request`.\n3. The host component contains CRLF or another header-unsafe character.\n4. The request is serialized into a raw HTTP/1.x message without an explicit `Host` header.\n5. The host is copied into the serialized `Host` header.\n6. The serialized request is written to the network or otherwise processed by software that does not independently reject the malformed host.\n\nIn that flow, an attacker can cause the serialized request to contain additional attacker-controlled header lines. For example, a host containing `\"\\r\\nX-Injected: yes\"` can cause the generated `Host` header to span multiple HTTP header lines.\n\nThis is not the normal request-sending path used by `guzzlehttp/guzzle`. Applications using `guzzlehttp/psr7` only through Guzzle's standard HTTP client APIs are not expected to be affected. Applications are most likely to be affected when they manually serialize PSR-7 requests, forward raw HTTP messages, or use custom transports, proxying, crawling, webhook delivery, or similar request-dispatch code that serializes requests without independently validating URI hosts and header data. In deployments involving HTTP/1.1 connection reuse, proxies, gateways, or load balancers, this malformed serialized request may also contribute to request smuggling or cache poisoning, depending on how downstream components parse the request.\n\n## Patches\n\nThe issue is patched in `2.10.2` and later. `1.x` is end-of-life and will not receive a patch.\n\n## Workarounds\n\nIf you cannot upgrade immediately, validate and reject all untrusted URI strings before constructing PSR-7 `Uri` or `Request` instances. Reject input containing ASCII control characters, whitespace, or DEL, including CRLF, tab, space, NUL, or DEL characters:\n\n```php\nif (preg_match('/[\\x00-\\x20\\x7F]/', $untrustedUrl)) {\n throw new \\InvalidArgumentException('Insecure URL detected');\n}\n```\n\nApplications that manually serialize or forward requests should also ensure the final HTTP client, transport, or serializer rejects invalid URI and header data before writing requests to the network.\n\n## References\n\n* https://www.rfc-editor.org/rfc/rfc9112.html#section-3.2\n* https://www.rfc-editor.org/rfc/rfc9112.html#section-5\n* https://www.rfc-editor.org/rfc/rfc9112.html#section-11.2\n* https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "guzzlehttp/psr7"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/guzzle/psr7/security/advisories/GHSA-hq7v-mx3g-29hw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-49214"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/psr7/CVE-2026-49214.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/guzzle/psr7"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-113", "CWE-20", "CWE-93" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-11T13:04:47Z",
"nvd_published_at" : "2026-06-11T13:16:33Z"
}
}