Improper Input Validation in nyholm/psr7
Impact
Improper header parsing. An attacker could sneak in a newline (\n) into both the header names and values. While the specification states that \r\n\r\n is used to terminate the header list, many servers in the wild will also accept \n\n.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 1.6.1Ecosystem versions | 1.6.1 |
Version evidence: OSV · GHSA-wjfc-pgfp-pv9c
View original version evidence (19 explicit versions)
Original source description
Impact
Improper header parsing. An attacker could sneak in a newline (\n) into both the header names and values. While the specification states that \r\n\r\n is used to terminate the header list, many servers in the wild will also accept \n\n.
Patches
The issue is patched in 1.6.1.
Workarounds
There are no known workarounds.
References
References
- Security advisory github.com/Nyholm/psr7/security/advisories/GHSA-wjfc-pgfp-pv9c
- Security advisory github.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96
- Security advisory github.com/guzzle/psr7/security/advisories/GHSA-wxmh-65f7-jcvw
- Security advisory nvd.nist.gov/vuln/detail/CVE-2023-29197
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/nyholm/psr7/2023-04-17.yaml
- Source reference github.com/Nyholm/psr7