Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
LOW severity

CVE-2022-0841 — npm-lockfile

LOWFix: ljharb/npm-lockfile@bfdb848

CVE-2022-0841 is a low-severity (CVSS 3.8) OS Command Injection vulnerability in npm-lockfile. 1 public exploit reference exists, so weaponization risk is real. A fix is available for npm-lockfile — see the affected versions and patch details below.

OS Command Injection in ljharb/npm-lockfile

Also known asGHSA-cr6m-62pq-hmqh
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs84th percentile — riskier than 84% of all scored CVEsHighest risk
0.00%1.04%2.09%3.13%0.5%2.5%2.5%2.5%May 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2022-0841 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

npm-lockfilenpm
7Kdownloads / week

Description

npm-lockfile safely generates an npm lockfile and output it to the filename of your choice. npm-lockfile before 2.0.4 does not santize unsafe external input and invoke sensitive command execution API with the input, causing command injection vulnerability. A fix was released in version 2.0.5.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmnpm-lockfile≥ 2.0.3&&< 2.0.52.0.5npm install npm-lockfile@2.0.5

Affected Products

1 product · 2 configurations
Application
npm-lockfilenpm-lockfile_project
2 versions
2.0.32.0.4
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for npm-lockfile, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update npm-lockfile to 2.0.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-0841 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

npm-lockfile safely generates an npm lockfile and output it to the filename of your choice. npm-lockfile before 2.0.4 does not santize unsafe external input and invoke sensitive command execution API with the input, causing command injection vulnerability. A fix was released in version 2.0.5.
O3 Security · Impact-Aware SCA

Is CVE-2022-0841 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2022-0841: npm-lockfile — Fixed in 2.0.5