← back
CVE-2026-55766

guzzlehttp/psr7: CRLF Injection in HTTP Start-Line Serialization

CVSS 4.8 MEDIUMCWE-113CWE-93
In short

The guzzlehttp/psr7 library allows attackers to inject newline characters (CR/LF) into HTTP request methods, protocol versions, or response reason phrases. When these messages are serialized and sent over the network, the injected newlines can create fake HTTP headers, potentially tricking servers or proxies into processing unintended requests.

Technical detail

CWE-113 (Improper Neutralization of CRLF Sequences in HTTP Headers) and CWE-93 (Improper Neutralization of CRLF Sequences in HTTP Start-Line) allow CRLF injection through attacker-controlled data in request method, protocol version, or response reason phrase fields. The vulnerability manifests when a PSR-7 message containing these malformed start-line values is serialized via Message::toString() or equivalent and transmitted; downstream systems that do not independently validate the HTTP start line may process injected header lines. Exploitation requires both message creation with attacker input and subsequent serialization/network transmission.

Summary generated and translated by AI from the official description.
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.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Affected products
guzzle · psr7

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →