@hapi/content: Regular Expression Denial of Service (ReDoS) in HTTP header parsing
Description
Published to the GitHub Advisory Database
Apr 4, 2026
Reviewed
Apr 4, 2026
Published by the National Vulnerability Database
Apr 6, 2026
Last updated
Apr 6, 2026
All versions of
@hapi/contentthrough 6.0.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via crafted HTTP header values. Three regular expressions used to parseContent-TypeandContent-Dispositionheaders contain patterns susceptible to catastrophic backtracking.Impact
Denial of Service. An unauthenticated remote attacker can cause a Node.js process to become unresponsive by sending a single HTTP request with a maliciously crafted header value.
Patches
Fixed by tightening all three regular expressions to eliminate backtracking.
Workarounds
There are no known workarounds. Upgrade to the patched version.
References