guzzlehttp/psr7 security advisory
CVE-2026-49214: CRLF injection via URI host component in guzzlehttp/psr7
CVE-2026-49214 is a medium-severity header injection vulnerability in the PHP package guzzlehttp/psr7 (CVSS 5.3), published 11 June 2026. It is fixed in 2.10.2; earlier versions are affected. It can be exploited without an account.
medium 5.3 published 2026-06-11 · updated 2026-10-25
- Affected versions
- < 2.10.2
- Fixed in
- 2.10.2
- Newest release
- 3.2.0
- Severity
- Medium · CVSS 5.3
- Type
- Header injection
CWE-20, CWE-93, CWE-113 - 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-49214
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by GitHub): 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 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.10.2 or newer. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"guzzlehttp/psr7": "^2.10.2"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-49214. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
The advisory gives this workaround:
As a workaround, validate and reject all untrusted URI strings before constructing PSR-7 `Uri` or `Request` instances.
- Strip CR and LF characters from any user input that ends up in mail or HTTP headers, including parameter names.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-49214 advisory
guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Versions prior to 2.10.2 did not reject ASCII control characters, whitespace, or DEL in first-party URI host components. A vulnerable flow is: First, an application accepts a user-controlled URL. Second, the URL is used to construct a PSR-7 `Uri` or `Request`. Third, the host component contains CRLF or another header-unsafe character. Fourth, the host is copied into the PSR-7 `Host` header when no explicit `Host` header is provided. Finally, the request is serialized or sent by an HTTP client that does not independently reject the malformed host. In 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. Applications are affected when they use user-controlled URLs for outbound HTTP requests, URL forwarding, proxying, crawling, webhook delivery, or similar request-dispatch flows. In deployments involving HTTP/1.1 connection reuse, proxies, gateways, or load balancers, this malformed request may also contribute to request smuggling or cache poisoning, depending on how downstream components parse the request. The issue is patched in `2.10.2` and later. `1.x` is end-of-life and will not receive a patch. As a workaround, 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. Applications that forward requests should also ensure the final HTTP client or serializer rejects invalid URI and header data before writing requests to the network.
References
- GitHub security advisory GHSA-hq7v-mx3g-29hw github.com
Other guzzlehttp/psr7 advisories
- medium CVE-2026-59882: Guzzlehttp/psr7: Host Confusion via Weak URI Host Validation 2026-07-21
- 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-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.