CVE catalog

CVE-2021-39135

npm affected and fixed versions

[CVE catalog]

`@npmcli/arborist`, the library that calculates dependency trees and manages the node_modules folder hierarchy for the npm command line interface, aims to guarantee that package dependency contracts will be met, and the extraction of package contents will always be performed into the expected folder. This is accomplished by extracting package contents into a project's `node_modules` folder. If the `node_modules` folder of the root project or any of its dependencies is somehow replaced with a symbolic link, it could allow Arborist to write package dependencies to any arbitrary location on the file system. Note that symbolic links contained within package artifact contents are filtered out, so another means of creating a `node_modules` symbolic link would have to be employed. 1. A `preinstall` script could replace `node_modules` with a symlink. (This is prevented by using `--ignore-scripts`.) 2. An attacker could supply the target with a git repository, instructing them to run `npm install --ignore-scripts` in the root. This may be successful, because `npm install --ignore-scripts` is typically not capable of making changes outside of the project directory, so it may be deemed safe. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above. For more information including workarounds please see the referenced GHSA-gmw6-94gg-2rc2.

Severity
High · CVSS 8.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.56% · Oct 27, 2026

Projects and upstream resources

Reported versions and fixes

Each observation applies to its named package, distribution, and release. Distribution backports can fix a vulnerability while retaining an older upstream version number.

Distribution / releasePackageVersionStatusSource
Debiantrixienpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debiantrixienpm9.2.0~ds1-3Fixed[CVE-2021-39135]
Debiansidnpm12.2.0+ds1-1Fixed[CVE-2021-39135]
Debiansidnpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debianforkynpm12.2.0+ds1-1Fixed[CVE-2021-39135]
Debianforkynpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debianbookwormnpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debianbookwormnpm9.2.0~ds1-1Fixed[CVE-2021-39135]

Showing 8 fix observations. All 29 observations, including unknown and conflicting reports, are available below.

Provider details and historical evidence
Distribution / releasePackageVersionStatusSource
UnknownRelease not reportednpm7.24.0+ds-2UnknownSource applicability is not establishedProvider not reported
Alpine3.11nodejs12.22.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.12nodejs12.22.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.13nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.14nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.15nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.16nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.17nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.18nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.19nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.20nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.21nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.22nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.23nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Alpine3.24nodejs14.17.6-r0UnknownSource applicability is not established[ALPINE-CVE-2021-39135]
Debianbookwormnpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debianbookwormnpm9.2.0~ds1-1Fixed[CVE-2021-39135]
Debianforkynpm12.2.0+ds1-1Fixed[CVE-2021-39135]
Debianforkynpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debiansidnpm12.2.0+ds1-1Fixed[CVE-2021-39135]
Debiansidnpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debiantrixienpm7.24.0+ds-2FixedDistribution-reported fixed boundary[CVE-2021-39135]
Debiantrixienpm9.2.0~ds1-3Fixed[CVE-2021-39135]
Ubuntu14.04npm1.2.18~dfsg-3UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Ubuntu14.04npm1.3.10~dfsg-1UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Ubuntu20.04npm5.8.0+ds6-4UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Ubuntu20.04npm6.14.4+ds-1ubuntu2UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Ubuntupronpm3.5.2-0ubuntu4UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Ubuntupronpm3.5.2-0ubuntu4.1.18.04.1~esm1UnknownSource applicability is not established[UBUNTU-CVE-2021-39135]
Original provider fields
{
  "package_releases": [
    {
      "name": "npm",
      "status": "fixed",
      "release": "sid",
      "version": "12.2.0+ds1-1"
    },
    {
      "name": "npm",
      "status": "fixed",
      "release": "forky",
      "version": "12.2.0+ds1-1"
    },
    {
      "name": "npm",
      "status": "fixed",
      "release": "trixie",
      "version": "9.2.0~ds1-3"
    },
    {
      "name": "npm",
      "status": "fixed",
      "release": "bookworm",
      "version": "9.2.0~ds1-1"
    }
  ],
  "fixed_versions": [
    {
      "bug": 993405,
      "name": "npm",
      "type": "source",
      "origin": null,
      "release": "sid",
      "urgency": "not yet assigned",
      "fixed_version": "7.24.0+ds-2"
    },
    {
      "bug": 993405,
      "name": "npm",
      "type": "source",
      "origin": null,
      "release": "forky",
      "urgency": "not yet assigned",
      "fixed_version": "7.24.0+ds-2"
    },
    {
      "bug": 993405,
      "name": "npm",
      "type": "source",
      "origin": null,
      "release": "trixie",
      "urgency": "not yet assigned",
      "fixed_version": "7.24.0+ds-2"
    },
    {
      "bug": 993405,
      "name": "npm",
      "type": "source",
      "origin": null,
      "release": "bookworm",
      "urgency": "not yet assigned",
      "fixed_version": "7.24.0+ds-2"
    }
  ],
  "distribution_packages": [
    {
      "name": "npm",
      "fixed_version": "7.24.0+ds-2",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "12.22.6-r0"
            }
          ]
        }
      ],
      "release": "3.11",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "12.22.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "12.22.6-r0"
            }
          ]
        }
      ],
      "release": "3.12",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "12.22.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.13",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.14",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.15",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.16",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.17",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.18",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.19",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.20",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.21",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.22",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.23",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "nodejs",
      "distro": "alpine",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.17.6-r0"
            }
          ]
        }
      ],
      "release": "3.24",
      "versions": [],
      "ecosystem": "apk",
      "provider_url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-39135",
      "fixed_version": "14.17.6-r0",
      "provider_source": "pypi",
      "provider_record_id": "ALPINE-CVE-2021-39135",
      "provider_updated_at": "2026-10-23T17:17:56.206949132Z",
      "applicability_unknown": true
    },
    {
      "name": "npm",
      "distro": "ubuntu",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            }
          ]
        }
      ],
      "release": "14.04",
      "versions": [
        "1.2.18~dfsg-3",
        "1.3.10~dfsg-1"
      ],
      "ecosystem": "deb",
      "provider_url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-39135",
      "fixed_version": "",
      "provider_source": "pypi",
      "provider_record_id": "UBUNTU-CVE-2021-39135",
      "provider_updated_at": "2025-10-24T04:50:29Z",
      "applicability_unknown": true
    },
    {
      "name": "npm",
      "distro": "ubuntu",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            }
          ]
        }
      ],
      "release": "pro",
      "versions": [
        "3.5.2-0ubuntu4",
        "3.5.2-0ubuntu4.1.18.04.1~esm1"
      ],
      "ecosystem": "deb",
      "provider_url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-39135",
      "fixed_version": "",
      "provider_source": "pypi",
      "provider_record_id": "UBUNTU-CVE-2021-39135",
      "provider_updated_at": "2025-10-24T04:50:29Z",
      "applicability_unknown": true
    },
    {
      "name": "npm",
      "distro": "ubuntu",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            }
          ]
        }
      ],
      "release": "20.04",
      "versions": [
        "5.8.0+ds6-4",
        "6.14.4+ds-1ubuntu2"
      ],
      "ecosystem": "deb",
      "provider_url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-39135",
      "fixed_version": "",
      "provider_source": "pypi",
      "provider_record_id": "UBUNTU-CVE-2021-39135",
      "provider_updated_at": "2025-10-24T04:50:29Z",
      "applicability_unknown": true
    }
  ]
}

[Debian bug #993405]

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

[Debian 12 (Bookworm)]

  • [npm]Unknown
    Details (2)
    • 9.2.0~ds1-1 · all · bookworm

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · bookworm; dsa · npm · debian · 12

    • 9.2.0~ds1-1 · all · bookworm

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · bookworm; dsa · npm · debian · 12

[Debian 13 (Trixie)]

  • [npm]Unknown
    Details (2)
    • 9.2.0~ds1-3 · all · trixie

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · 13

    • 9.2.0~ds1-3 · all · trixie

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · 13

Observed:

References