Every CVE Search/ Get API key

CVE-2022-0841

OS Command Injection in ljharb/npm-lockfile

3.8 LowFix available

OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.

Attack profile

How easy it is to exploit

Attack vector
Adjacent network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
None

Exploit likelihood

2.51%Up 1.5 points since Mar 4, 2022
90%50%10%1%

What each source reports

CVE List Score used 3.8

OS Command Injection in ljharb/npm-lockfile

OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.

Record
CVE-2022-0841
CVSS 3.0
3.8 LowCVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Weakness
CWE-78
Updated
2026-11-02
EUVDEUVD-2022-1409 3.8

OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.

Record
EUVD-2022-1409
CVSS 3.0
3.8 LowCVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-cr6m-62pq-hmqh 9.8

OS Command injection in npm-lockfile

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.

Record
GHSA-cr6m-62pq-hmqh
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02
NVD 9.8

OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.

Record
CVE-2022-0841
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
3.8 LowCVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
CVSS 2.0
10.0 HighAV:N/AC:L/Au:N/C:C/I:C/A:C
Weakness
CWE-78
Updated
2026-11-02
OSV 3.8

OS Command Injection in ljharb/npm-lockfile

OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.

Record
CVE-2022-0841
CVSS 3.0
3.8 LowCVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Weakness
CWE-78
Updated
2026-11-02
OSVGHSA-cr6m-62pq-hmqh 9.8

OS Command injection in npm-lockfile

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.

Record
GHSA-cr6m-62pq-hmqh
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-78
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
npm-lockfile
npm
2.0.3 up to 2.0.5
2.0.5

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-0841 is a low vulnerability (CVSS 3.8) in Ljharb Ljharb/npm-lockfile, published March 3, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.51%, the 84th percentile. Fixed in npm-lockfile 2.0.5.

References

MoveEnter Open