Quick answers
- Is CVE-2018-3712 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2018-3712 being exploited in the wild.
- How severe is CVE-2018-3712?
- Low severity, with a CVSS score of 3, published 27 July 2018.
- Which products and versions are affected?
- serve (npm) SEMVER:introduced=0,fixed=6.4.9.
- Is there a fix for CVE-2018-3712?
- Yes. serve (npm): upgrade to 6.4.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2018-3712 attacked?
- It is attacked over the network.
- Am I affected by CVE-2018-3712?
- Check whether you run serve (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.
How to fix
- serve (npm): upgrade to 6.4.9 or later
npm install serve@6.4.9
Technical details
The vulnerability exists in serve versions prior to 6.4.9 and stems from improper handling of percent-encoded path separators (%2e representing "." and %2f representing "/"). Attackers can craft URLs containing these encoded characters to traverse the directory tree and enumerate directory contents, bypassing path normalization. The attack is network-reachable and requires no authentication. While directory listing is exposed, arbitrary file read is not possible. The fix was merged in PR #316 and released in version 6.4.9, which properly normalizes and scopes paths to the working directory.
Affected products
- Vercel serve prior to 6.4.9
Identifiers
- CVE-2018-3712
- GHSA-q2qh-cgc2-qhr3
Timeline
- 2018-07-27: disclosed
- 2018-01-23: patched: Fix merged in PR #316