GHSA-886v-mm6p-4m66 json
High severity vulnerability that affects gun
published 7y ago modified 5y ago
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
## Urgent Upgrade
The static file server module included with GUN had a **serious vulnerability**:
- Using `curl --path-as-is` allowed reads on any parent directory or files.
This did not work via the browser or via curl without as-is option.
### Fixed
This has been fixed since version `0.2019.416` and higher.
### Who Was Effected?
Most NodeJS users who use the default setup, such as:
- `npm start` - `node examples/http.js` - `Heroku` 1-click-deploy - `Docker` - `Now`
If you have a custom NodeJS code then you are probably safe *unless* you have something like `require('http').createServer(Gun.serve(__dirname))` in it.
If you have not upgraded, it is **mandatory** or else it is highly likely your environment variables and AWS (or other) keys could be leaked.
### Credit
It was reported and fixed by [JK0N](https://github.com/amark/gun/pull/527), but I did not understand the `--path-as-is` condition.
Joonas Loppi from [function61](http://function61.com) rediscovered it and explained the urgency to me to fix it.
Patch / fix
- npm gun 0.2019.416
Is GHSA-886v-mm6p-4m66 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | gun | <0.2019.416 |
0.2019.416 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
Sources
- GitHub Advisory GHSA-886v-mm6p-4m66
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.