npm Token Leak in npm
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
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | npm | < 2.15.1, >= 3.0.0, < 3.8.3 | 2.15.1, 3.8.3 |
Verweise
- https://nvd.nist.gov/vuln/detail/CVE-2016-3956
- https://github.com/npm/npm/issues/8380
- https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29
- https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401
- https://github.com/advisories/GHSA-m5h6-hr3q-22h5
- https://nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016
- https://www.npmjs.com/advisories/98
- http://blog.npmjs.org/post/142036323955/fixing-a-bearer-token-vulnerability
- http://www-01.ibm.com/support/docview.wss?uid=swg21980827
- Schwäche (CWE)
CWE-200- Plattform
- npm
- Paket
npm- Veröffentlicht
- 31.07.2018
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-m5h6-hr3q-22h5 - CC BY 4.0
Schwachstellenhistorie: npm
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 8
- Erste → letzte
- 07.2018 06.2022
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 6
- Mittel 1
- Niedrig 1
Veröffentlichungen pro Jahr
- 2018: 1
- 2019: 3
- 2020: 2
- 2021: 0
- 2022: 2
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
npm Token Leak in npm dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.