Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Informational severity, published 3 September 2020.
- Which products and versions are affected?
- npm (npm) 0 through 4.0.6 (all previous versions are affected; fixed in 4.1.1).
- Is there a fix for This vulnerability?
- A patch was published on 2020-02-13: Fix released in v4.1.1 and package deprecated in favor of @hapi/content Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run npm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability is a denial of service flaw in the Content-Encoding HTTP header parser of the npm content package. When the parser encounters certain invalid values in the Content-Encoding header, it throws a system-level error rather than an application error. The hapi framework rethrows system errors instead of catching them as expected application errors, allowing the unhandled exception to propagate up the call stack. If the application lacks a global unhandled exception handler, this causes a process crash. The attack requires only network access and a single HTTP request with a malformed Content-Encoding header; no authentication is required. The package has been deprecated and replaced by @hapi/content, which contains the fix.
Affected products
- npm content 0 through 4.0.6 (all previous versions are affected; fixed in 4.1.1)
Timeline
- 2020-09-03: disclosed
- 2020-02-13: patched: Fix released in v4.1.1 and package deprecated in favor of @hapi/content