{"id":"GHSA-886v-mm6p-4m66","aliases":["GHSA-886v-mm6p-4m66"],"related":[],"kind":"vulnerability","state":"published","title":"High severity vulnerability that affects gun","summary":"## Urgent Upgrade\n\nThe static file server module included with GUN had a **serious vulnerability**:\n\n - Using `curl --path-as-is` allowed reads on any parent directory or files.\n\nThis did not work via the browser or via curl without as-is option.\n\n ### Fixed\n\nThis has been fixed since version `0.2019.416` and higher.\n\n ### Who Was Effected?\n\nMost NodeJS users who use the default setup, such as:\n\n - `npm start`\n - `node examples/http.js`\n - `Heroku` 1-click-deploy\n - `Docker`\n - `Now`\n\nIf you have a custom NodeJS code then you are probably safe *unless* you have something like `require('http').createServer(Gun.serve(__dirname))` in it.\n\nIf you have not upgraded, it is **mandatory** or else it is highly likely your environment variables and AWS (or other) keys could be leaked.\n\n ### Credit\n\nIt was reported and fixed by [JK0N](https://github.com/amark/gun/pull/527), but I did not understand the `--path-as-is` condition.\n\nJoonas Loppi from [function61](http://function61.com) rediscovered it and explained the urgency to me to fix it.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"## Urgent Upgrade\n\nThe static file server module included with GUN had a **serious vulnerability**:\n\n - Using `curl --path-as-is` allowed reads on any parent directory or files.\n\nThis did not work via the browser or via curl without as-is option.\n\n ### Fixed\n\nThis has been fixed since version `0.2019.416` and higher.\n\n ### Who Was Effected?\n\nMost NodeJS users who use the default setup, such as:\n\n - `npm start`\n - `node examples/http.js`\n - `Heroku` 1-click-deploy\n - `Docker`\n - `Now`\n\nIf you have a custom NodeJS code then you are probably safe *unless* you have something like `require('http').createServer(Gun.serve(__dirname))` in it.\n\nIf you have not upgraded, it is **mandatory** or else it is highly likely your environment variables and AWS (or other) keys could be leaked.\n\n ### Credit\n\nIt was reported and fixed by [JK0N](https://github.com/amark/gun/pull/527), but I did not understand the `--path-as-is` condition.\n\nJoonas Loppi from [function61](http://function61.com) rediscovered it and explained the urgency to me to fix it.","format":"markdown","source":"ghsa"}],"published":"2019-06-05T09:48:02.000Z","modified":"2021-09-07T15:24:35.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2019.416"}],"ecosystem":"npm","package":"gun","purl":"pkg:npm/gun","source":"ghsa"}],"references":[{"url":"https://github.com/amark/gun/security/advisories/GHSA-886v-mm6p-4m66","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-886v-mm6p-4m66","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/amark/gun","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-886v-mm6p-4m66","url":"https://github.com/advisories/GHSA-886v-mm6p-4m66","licence":"CC-BY-4.0","modified":"2021-09-07T15:24:35.000Z"}],"updatedAt":"2026-11-25T22:56:44.687Z"}