Lucene search

K
githubGitHub Advisory DatabaseGHSA-M5H6-HR3Q-22H5
HistoryJul 31, 2018 - 10:58 p.m.

npm Token Leak in npm

2018-07-3122:58:35
CWE-200
GitHub Advisory Database
github.com
19

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

0.002 Low

EPSS

Percentile

61.9%

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

  1. Update npm with npm install npm@latest -g
  2. Revoke your Tokens
  3. Enable Two-Factor Authentication

Affected configurations

Vulners
Node
npm-programmatic_projectnpm-programmaticRange3.8.2
OR
npm-programmatic_projectnpm-programmaticRange2.15.0
CPENameOperatorVersion
npmle3.8.2
npmle2.15.0

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

NONE

Availability Impact

NONE

AV:N/AC:L/Au:N/C:P/I:N/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

0.002 Low

EPSS

Percentile

61.9%