Skip to content
Noroxi
CVE-2019-16776· NVD / CVE Program· CNA GitHub_M

Unauthorized File Access in npm CLI before before version 6.13.3

Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It fails to prevent access to folders outside of the intended node_modules folder through the bin field. A properly constructed entry in the package.json bin field would allow a package publisher to modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.

HighCVSS 8.1 · v3.1—No exploit Fix available
Published
Dec 12, 2019
Updated
Jun 16, 2026
EPSS
3.4% · 88th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

33

Monitor

Low priority for now.

CVSS
32 / 40 · 8.1 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 3.4%

CNA vs NVD score

NVD
8.1
CNA · GitHub_M
7.7
0.4 point gap

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

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Affected systems

VendorProduct
npmjsnpm
opensuseleap
oraclegraalvm
fedoraprojectfedora
redhatenterprise linux
redhatenterprise linux eus

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • fedoraproject fedora31
  • npmjs npmbefore 6.13.3
  • opensuse leap15.1
  • oracle graalvm19.3.0.2
  • redhat enterprise linux8.0
  • redhat enterprise linux eus8.1

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • npm cli

    • < 6.13.3 and later · before 6.13.3affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:8nodejs-nodemonbefore 1.18.3-1.module_el8.3.0+2047+b07ac28e1.18.3-1.module_el8.3.0+2047+b07ac28e
AlmaLinux:8nodejs-nodemonbefore 1.18.3-1.module_el8.3.0+2023+d2377ea31.18.3-1.module_el8.3.0+2023+d2377ea3
AlmaLinux:8nodejs-packagingbefore 17-3.module_el8.3.0+2023+d2377ea317-3.module_el8.3.0+2023+d2377ea3
AlmaLinux:8nodejs-packagingbefore 17-3.module_el8.4.0+2521+c668cc9f17-3.module_el8.4.0+2521+c668cc9f
AlmaLinux:8nodejs-packagingbefore 17-3.module_el8.4.0+2224+b07ac28e17-3.module_el8.4.0+2224+b07ac28e
Debian:12npmbefore 6.13.4+ds-26.13.4+ds-2
npmnpmbefore 6.13.36.13.3
openSUSE:Leap 15.1nodejs8before 8.17.0-lp151.2.9.18.17.0-lp151.2.9.1
Red Hat:enterprise_linux:8::appstreamnodejsbefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejsbefore 1:12.14.1-1.module+el8.1.0+5466+30f756291:12.14.1-1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnodejs-debuginfobefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejs-debuginfobefore 1:12.14.1-1.module+el8.1.0+5466+30f756291:12.14.1-1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnodejs-debugsourcebefore 1:12.14.1-1.module+el8.1.0+5466+30f756291:12.14.1-1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnodejs-debugsourcebefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejs-develbefore 1:12.14.1-1.module+el8.1.0+5466+30f756291:12.14.1-1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnodejs-develbefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejs-devel-debuginfobefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejs-docsbefore 1:12.14.1-1.module+el8.1.0+5466+30f756291:12.14.1-1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnodejs-docsbefore 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c1:10.19.0-1.module+el8.1.0+5726+6ed65f8c
Red Hat:enterprise_linux:8::appstreamnodejs-nodemonbefore 0:1.18.3-1.module+el8.1.0+3369+37ae6a450:1.18.3-1.module+el8.1.0+3369+37ae6a45
Red Hat:enterprise_linux:8::appstreamnodejs-packagingbefore 0:17-3.module+el8.1.0+3369+37ae6a450:17-3.module+el8.1.0+3369+37ae6a45
Red Hat:enterprise_linux:8::appstreamnpmbefore 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f756291:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629
Red Hat:enterprise_linux:8::appstreamnpmbefore 1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c
Red Hat:rhel_e4s:8.0::appstreamnodejsbefore 1:10.19.0-1.module+el8.0.0+5738+1362a79c1:10.19.0-1.module+el8.0.0+5738+1362a79c

+29

Other highest-scoring records for the same primary product.

  • CVE-2021-43616The npm ci command in npm 7.x and 8.x through 8.1.3 proceeds with an installation even if dependency information in package-lock.json differ
    40Plan
  • CVE-2022-29244npm packing does not respect root-level ignore files in workspaces
    31Monitor
  • CVE-2018-7408An issue was discovered in an npm 5.7.0 2018-02-21 pre-release (marked as "next: 5.7.0" and therefore automatically installed by an "npm upg
    31Monitor
  • CVE-2019-16777Arbitrary File Overwrite in npm CLI
    27Monitor
  • CVE-2020-15095Sensitive information exposure through logs in npm cli
    17Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
almalinux:nodejs-nodemon1.18.3-1.module_el8.3.0+2023+d2377ea3 · AlmaLinux:8Package registry (OSV)
almalinux:nodejs-packaging17-3.module_el8.4.0+2224+b07ac28e · AlmaLinux:8Package registry (OSV)
debian:npm6.13.4+ds-2 · Debian:12Package registry (OSV)
npm:npm6.13.3Package registry (OSV)
opensuse:nodejs88.17.0-lp151.2.9.1 · openSUSE:Leap 15.1Package registry (OSV)
red hat:nodejs1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-debuginfo1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-debugsource1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-devel1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-devel-debuginfo1:10.19.0-1.module+el8.0.0+5738+1362a79c · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:nodejs-docs1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-nodemon0:1.18.3-1.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:nodejs-packaging0:17-3.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:npm1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rh-nodejs10-nodejs0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7Package registry (OSV)
red hat:rh-nodejs10-nodejs-debuginfo0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7Package registry (OSV)
red hat:rh-nodejs10-nodejs-devel0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7Package registry (OSV)
rocky linux:nodejs-nodemon0:1.18.3-1.module+el8.3.0+101+f84c7154 · Rocky Linux:8Package registry (OSV)
rocky linux:nodejs-packaging0:17-3.module+el8.3.0+101+f84c7154 · Rocky Linux:8Package registry (OSV)
suse:nodejs1010.18.0-1.15.1 · SUSE:Linux Enterprise Module for Web and Scripting 12Package registry (OSV)
suse:nodejs1212.15.0-1.6.1 · SUSE:Linux Enterprise Module for Web and Scripting 12Package registry (OSV)
suse:nodejs66.17.1-11.30.1 · SUSE:OpenStack Cloud 7Package registry (OSV)
suse:nodejs88.17.0-3.25.1 · SUSE:Linux Enterprise Module for Web and Scripting 15Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
none
Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
None

CVSS vector

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

nvd-primary

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records