CVE-2026-49214·PHP vulnerability
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.
- Severity
- medium
- Software
- PHP
- Fixed in
- 2.10.2
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.19% — higher than 9% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 2.10.2
Fixed in: 2.10.2
How to fix this CVE
Update the guzzlehttp/psr7 library to version 2.10.2 or later to prevent HTTP header injection through malformed URI host components. If you are using PHP with Composer, run `composer update guzzlehttp/psr7` to patch the vulnerability. Applications that process user-supplied URLs for outbound requests are most at risk and should prioritize this update immediately.
sudo dnf update php php-commonDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|GET.*HTTP/1\.1.*Host:.*[\r\n].*[\r\n][A-Za-z-]+:.*injected|Host:.*%0d%0a|Host:.*\\x0d\\x0a|\"host\".*:\"[^\"]*[\x00-\x1f\x7f]WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block HTTP requests with Host headers containing ASCII control characters (0x00-0x1F), DEL (0x7F), or CRLF sequences. Use ModSecurity rule ID 930100 or equivalent to detect and block malformed headers. Additionally, reject requests with Host headers spanning multiple lines or containing non-printable characters.How to check if you are affected
- Step 1: Check installed PHP version: `php -v` and verify Composer dependencies with `composer show guzzlehttp/psr7`
- Step 2: Confirm if the application uses guzzlehttp/psr7 by checking `composer.lock` for the package and version: `grep -A 2 '"guzzlehttp/psr7"' composer.lock`
- Step 3: Search application logs for suspicious Host headers or CRLF sequences in request logs: `grep -i 'crlfx-injected\|\\r\\n' /var/log/apache2/error.log /var/log/nginx/error.log`
- Step 4: Verify the patch by running `composer show guzzlehttp/psr7` and confirming the version is 2.10.2 or higher
FAQ
What is CVE-2026-49214?
This vulnerability allows attackers to inject arbitrary HTTP headers into requests by embedding control characters and CRLF sequences in user-supplied URLs. When these malformed URIs are processed by guzzlehttp/psr7 versions prior to 2.10.2, the library fails to sanitize the host component, enabling header injection and potential request smuggling attacks.
Is CVE-2026-49214 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available at this time.
What versions of PHP are affected by CVE-2026-49214?
All PHP versions using guzzlehttp/psr7 prior to version 2.10.2 are affected. Version 1.x is end-of-life and will not receive a patch; users must upgrade to the 2.x series.
How do I check if my server is vulnerable to CVE-2026-49214?
Run `composer show guzzlehttp/psr7 | grep Version` to check the installed version. If it is below 2.10.2, your application is vulnerable. Additionally, verify your application accepts user-controlled URLs for outbound requests or proxying.
Does Defensia detect CVE-2026-49214?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and guzzlehttp/psr7 are installed on a monitored server, CVE-2026-49214 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-49214. Free for 1 server.
Get started free