Quick answers
- Is CVE-2018-3731 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2018-3731 being exploited in the wild.
- How severe is CVE-2018-3731?
- Low severity, with a CVSS score of 3.1, published 18 July 2018.
- Which products and versions are affected?
- public (npm) before 0.1.3.
- Is there a fix for CVE-2018-3731?
- A patch was published on 2018-07-18: Fixed in version 0.1.3 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2018-3731 attacked?
- It is attacked over the network.
- Am I affected by CVE-2018-3731?
- Check whether you run public (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 classic path traversal (CWE-22) caused by insufficient sanitization of user-supplied file paths. The vulnerable component is the file path handling logic in the HTTP request handler, which does not resolve and validate paths against a configured root directory. An unauthenticated attacker can send requests with traversal sequences (e.g., "../../../etc/passwd") to read arbitrary files. The attack requires only network access to the HTTP server and no user interaction. Fix is available in version 0.1.3 and later, which adds proper path resolution and validation.
Affected products
- npm public before 0.1.3
Identifiers
- CVE-2018-3731
- GHSA-rwv8-jvff-jq28
Timeline
- 2018-06-07: disclosed
- 2018-07-18: advisory
- 2018-07-18: patched: Fixed in version 0.1.3