Denial of Service in hapi
Published 7 Jun 2018 · Updated 8 Nov 2023
Affected package
- Affected
- <11.1.3
- Fixed in
- 11.1.3
npm install hapi@11.1.3Details
Versions of hapi prior to 11.1.3 are affected by a denial of service vulnerability.
The vulnerability is triggered when certain input is passed into the If-Modified-Since or Last-Modified headers.
This causes an 'illegal access' exception to be raised, and instead of sending a HTTP 500 error back to the sender, hapi will continue to hold the socket open until timed out (default node timeout is 2 minutes).
Recommendation
Update to v11.1.3 or later
Is GHSA-rc8h-3fv6-pxv8 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 hapi, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.