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 5 June 2019.
- Which products and versions are affected?
- gun (npm) SEMVER:introduced=0,fixed=0.2019.416.
- Is there a fix for This vulnerability?
- Yes. gun (npm): upgrade to 0.2019.416 or later. 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.
- Am I affected?
- Check whether you run gun (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
- gun (npm): upgrade to 0.2019.416 or later
npm install gun@0.2019.416
Technical details
The vulnerability is a path traversal flaw (CWE-22) in the lib/serve.js static file server module included with GUN. The issue occurs when curl is invoked with the --path-as-is flag, which bypasses URL normalization and allows dot-dot-slash sequences to traverse parent directories. The vulnerability does not trigger via standard browsers or curl without the flag, limiting the practical attack surface to direct HTTP requests with crafted path traversal payloads. An attacker with network access to an affected GUN instance can read sensitive files including environment variables and cloud credentials. The fix was released in version 0.2019.416 and higher.
Affected products
- amark GUN < 0.2019.416
Timeline
- 2019-06-04: disclosed
- 2019-06-04: patched: Fixed in version 0.2019.416