Improper Input Validation in nyholm/psr7
Published 21 Apr 2023 · Updated 29 Nov 2024
Is your project on an affected nyholm/psr7?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.6.1
- Fixed in
- 1.6.1
composer require nyholm/psr7:^1.6.1Details
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
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4
Is GHSA-wjfc-pgfp-pv9c in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected nyholm/psr7, and gives you the command that fixes it.
References
- Linkgithub.com/Nyholm/psr7/security/advisories/GHSA-wjfc-pgfp-pv9c
- Linkgithub.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96
- Linkgithub.com/guzzle/psr7/security/advisories/GHSA-wxmh-65f7-jcvw
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-29197
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/nyholm/psr7/2023-04-17.yaml
- Packagegithub.com/Nyholm/psr7
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.