ghsa-m5h6-hr3q-22h5
Vulnerability from github
Published
2018-07-31 22:58
Modified
2020-08-31 18:10
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.
An 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.
This compromised token could be used to do anything that the user could do, including publishing new packages.
Recommendation
- Update npm with
npm install npm@latest -g
- Revoke your Tokens
- Enable Two-Factor Authentication
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 2.15.0" }, "package": { "ecosystem": "npm", "name": "npm" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.15.1" } ], "type": "ECOSYSTEM" } ] }, { "database_specific": { "last_known_affected_version_range": "\u003c= 3.8.2" }, "package": { "ecosystem": "npm", "name": "npm" }, "ranges": [ { "events": [ { "introduced": "3.0.0" }, { "fixed": "3.8.3" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2016-3956" ], "database_specific": { "cwe_ids": [ "CWE-200" ], "github_reviewed": true, "github_reviewed_at": "2020-06-16T21:45:00Z", "nvd_published_at": "2016-07-02T14:59:00Z", "severity": "HIGH" }, "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\u0027s 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\u0027s 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)", "id": "GHSA-m5h6-hr3q-22h5", "modified": "2020-08-31T18:10:47Z", "published": "2018-07-31T22:58:35Z", "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" } ], "schema_version": "1.4.0", "severity": [], "summary": "npm Token Leak in npm" }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.