{ "schema_version": "1.4.0", "id": "GHSA-m5h6-hr3q-22h5", "modified": "2020-08-31T18:10:47Z", "published": "2018-07-31T22:58:35Z", "aliases": [ "CVE-2016-3956" ], "summary": "npm Token Leak in npm", "details": "Affected versions of the `npm` package include the bearer token of the logged in user in every request made by the CLI, even if the request is not directed towards the user's active registry. \n\nAn attacker could create an HTTP server to collect tokens, and by various means including but not limited to install scripts, cause the npm CLI to make a request to that server, which would compromise the user's token.\n\nThis compromised token could be used to do anything that the user could do, including publishing new packages.\n\n\n\n\n## Recommendation\n\n1. Update npm with `npm install npm@latest -g`\n2. [Revoke your Tokens](https://www.npmjs.com/settings/tokens)\n3. Enable [Two-Factor Authentication](https://docs.npmjs.com/getting-started/using-two-factor-authentication)", "severity": [], "affected": [ { "package": { "ecosystem": "npm", "name": "npm" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.15.1" } ] } ], "database_specific": { "last_known_affected_version_range": "<= 2.15.0" } }, { "package": { "ecosystem": "npm", "name": "npm" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "3.0.0" }, { "fixed": "3.8.3" } ] } ], "database_specific": { "last_known_affected_version_range": "<= 3.8.2" } } ], "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-3956" }, { "type": "WEB", "url": "https://github.com/npm/npm/issues/8380" }, { "type": "WEB", "url": "https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29" }, { "type": "WEB", "url": "https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401" }, { "type": "ADVISORY", "url": "https://github.com/advisories/GHSA-m5h6-hr3q-22h5" }, { "type": "WEB", "url": "https://nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016" }, { "type": "WEB", "url": "https://www.npmjs.com/advisories/98" }, { "type": "WEB", "url": "http://blog.npmjs.org/post/142036323955/fixing-a-bearer-token-vulnerability" }, { "type": "WEB", "url": "http://www-01.ibm.com/support/docview.wss?uid=swg21980827" } ], "database_specific": { "cwe_ids": [ "CWE-200" ], "severity": "HIGH", "github_reviewed": true, "github_reviewed_at": "2020-06-16T21:45:00Z", "nvd_published_at": "2016-07-02T14:59:00Z" } }