MediumGHSA-wjfc-pgfp-pv9c

Improper Input Validation in nyholm/psr7

Published 21 Apr 2023 · Updated 29 Nov 2024

Is your project on an affected nyholm/psr7?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

nyholm/psr7Composer
Affected
<1.6.1
Fixed in
1.6.1
Update to the fixed version for your release line, for example:composer require nyholm/psr7:^1.6.1

Details

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

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.