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
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | nyholm/psr7 | < 1.6.1 | 1.6.1 | GHSA-wjfc-pgfp-pv9c |
References
- https://github.com/Nyholm/psr7/security/advisories/GHSA-wjfc-pgfp-pv9c web
- https://github.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96 web
- https://github.com/guzzle/psr7/security/advisories/GHSA-wxmh-65f7-jcvw web
- https://nvd.nist.gov/vuln/detail/CVE-2023-29197 advisory
- https://github.com/FriendsOfPHP/security-advisories/blob/master/nyholm/psr7/2023-04-17.yaml web
- https://github.com/Nyholm/psr7 package