Improper header name validation in guzzlehttp/psr7
Description
CVE-2023-29197 is an improper header parsing vulnerability in guzzlehttp/psr7 where a newline character can be injected into header names/values, bypassing the fix from CVE-2022-24775.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CVE-2023-29197 is an improper header parsing vulnerability in guzzlehttp/psr7 where a newline character can be injected into header names/values, bypassing the fix from CVE-2022-24775.
Vulnerability
Overview
CVE-2023-29197 is an improper header parsing vulnerability in the guzzlehttp/psr7 library, a PSR-7 HTTP message implementation in PHP. The flaw arises from insufficient validation of header names and values, allowing an attacker to inject a newline character (\n) into header fields. While the HTTP specification (RFC 7230) mandates \r\n\r\n to terminate the header block, many real-world servers also accept \n\n, enabling this injection to bypass the original fix applied for CVE-2022-24775 [3][1].
Exploitation
Details
An attacker can exploit this vulnerability by crafting malicious HTTP requests or responses containing header names or values with embedded newlines. This injection can cause the recipient to misinterpret the boundaries between headers and the message body, potentially leading to request smuggling or response splitting. The attack requires no authentication and can be performed over standard HTTP connections, making it accessible to any network-level adversary [2].
Impact
Successful exploitation could allow an attacker to manipulate HTTP message parsing in PHP applications using the vulnerable library. This may lead to cache poisoning, cross-site scripting (XSS) in certain contexts, or bypassing security controls that rely on header integrity. The vulnerability has a CVSS v3.1 base score of 7.5 (High), reflecting the potential for significant impact without user interaction [3].
Mitigation
The issue has been patched in guzzlehttp/psr7 versions 1.9.1 and 2.4.5. Users are strongly advised to update immediately, as no known workarounds exist [3]. The project has also marked the 1.x branch as end-of-life (EOL) as of June 2024, emphasizing the need to migrate to version 2.x [2].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
guzzlehttp/psr7Packagist | < 1.9.1 | 1.9.1 |
guzzlehttp/psr7Packagist | >= 2.0.0, < 2.4.5 | 2.4.5 |
Affected products
2Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
12- github.com/advisories/GHSA-wxmh-65f7-jcvwghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-29197ghsaADVISORY
- cve.mitre.org/cgi-bin/cvename.cgighsax_refsource_MISCWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/psr7/CVE-2023-29197.yamlghsaWEB
- github.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96ghsax_refsource_MISCWEB
- github.com/guzzle/psr7/security/advisories/GHSA-wxmh-65f7-jcvwghsax_refsource_CONFIRMWEB
- lists.debian.org/debian-lts-announce/2023/12/msg00028.htmlghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FJANWDXJZE5BGLN4MQ4FEHV5LJ6CMKQFghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O35UN4IK6VS2LXSRWUDFWY7NI73RKY2UghsaWEB
- www.rfc-editor.org/rfc/rfc7230ghsax_refsource_MISCWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FJANWDXJZE5BGLN4MQ4FEHV5LJ6CMKQF/mitre
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O35UN4IK6VS2LXSRWUDFWY7NI73RKY2U/mitre
News mentions
0No linked articles in our index yet.