GHSA-m5h6-hr3q-22h5

    Dashboard / Vulnerabilities / GHSA-m5h6-hr3q-22h5

    GHSA-m5h6-hr3q-22h5

    Published: 31 Jul 2018Last Modified: 10 Sept 2026
    Aliases:

    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 1. Update npm with `npm install npm@latest -g` 2. [Revoke your Tokens](https://www.npmjs.com/settings/tokens) 3. Enable [Two-Factor Authentication](https://docs.npmjs.com/getting-started/using-two-factor-authentication)

    Affected packages

    Package

    Name: npm

    Purl: pkg:npm/npm

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -2.15.1

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High