CVE-2026-55766·PHP vulnerability
guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Prior to 2.12.1, guzzlehttp/psr7 did not reject CR/LF characters in certain first-party HTTP start-line fields: the request method, protocol version, and response reason phrase. If an application placed attacker-controlled data into one of those fields and later serialized the PSR-7 message as raw HTTP/1.x, for example with Message::toString() or an equivalent serializer, the serialized message could contain attacker-controlled header lines. The issue can also be reached through Message::parseRequest() or Message::parseResponse() when malformed raw messages are parsed into first-party PSR-7 objects and then serialized again. Creating or modifying a Request, Response, or other PSR-7 object alone is not sufficient. The issue requires the malformed message to be serialized and written to the network, forwarded, replayed, or otherwise processed by software that does not independently reject the malformed start line. This vulnerability is fixed in 2.12.1.
- Severity
- medium
- Software
- PHP
- Fixed in
- 2.12.1
- 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.16% — higher than 5% 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.12.1
Fixed in: 2.12.1
How to fix this CVE
Update the guzzlehttp/psr7 library to version 2.12.1 or later to prevent HTTP header injection attacks through malformed start-line fields. If you manage PHP dependencies via Composer, run 'composer update guzzlehttp/psr7' to patch the vulnerability. Ensure your application does not serialize untrusted data into HTTP request methods, protocol versions, or response reason phrases before transmitting messages over the network.
sudo dnf update php php-guzzlehttp-psr7Defensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
HTTP traffic containing CR/LF bytes (0x0D 0x0A) within HTTP start-line fields (request line or status line) such as: POST%0D%0A or HTTP/1.1%0D%0A injected into method, version, or reason phrase fieldsWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement input validation rules to reject any HTTP start-line fields (method, HTTP version, reason phrase) containing CR/LF characters before they reach the application; block requests where these fields contain byte sequences matching [\r\n] or their URL-encoded equivalents %0D%0A and %0AHow to check if you are affected
- Step 1: Check installed guzzlehttp/psr7 version by running 'php -r "require_once(\'vendor/autoload.php\'); echo \\GuzzleHttp\\Psr7\\Utils::class;"' or inspect composer.lock for the version string
- Step 2: Verify if your application uses Message::toString(), Message::parseRequest(), or Message::parseResponse() methods by grepping your codebase: grep -r 'Message::toString\|Message::parseRequest\|Message::parseResponse' /path/to/app
- Step 3: Search application logs for HTTP requests containing CR/LF sequences (\r\n) in unexpected locations within start-line fields using: grep -E '[\r\n]' /var/log/php-errors.log | head -20
- Step 4: After updating, confirm the patched version with 'php -r "require_once(\'vendor/autoload.php\'); echo \\Composer\\InstalledVersions::getVersion(\'guzzlehttp/psr7\');"' and verify it returns 2.12.1 or higher
FAQ
What is CVE-2026-55766?
This vulnerability allows attackers to inject HTTP header lines into serialized PSR-7 messages by embedding carriage return/line feed (CR/LF) characters in HTTP start-line fields like the request method or response reason phrase. When these malformed messages are serialized and transmitted, downstream systems may process the injected headers.
Is CVE-2026-55766 being actively exploited?
No, this vulnerability is not listed in the CISA KEV catalog and no public exploits are currently available, though the attack vector requires specific application configurations to be exploitable.
What versions of guzzlehttp/psr7 are affected by CVE-2026-55766?
All versions prior to 2.12.1 are affected; applications using guzzlehttp/psr7 version 2.12.0 or earlier should upgrade immediately.
How do I check if my server is vulnerable to CVE-2026-55766?
Run 'composer show guzzlehttp/psr7' in your project root, or check 'php -r "require_once(\'vendor/autoload.php\'); echo \\Composer\\InstalledVersions::getVersion(\'guzzlehttp/psr7\');"' to see the installed version; if it is below 2.12.1, your application is vulnerable.
Does Defensia detect CVE-2026-55766?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If guzzlehttp/psr7 is present in your PHP dependencies, CVE-2026-55766 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-55766. Free for 1 server.
Get started free