CVE-2022-0841
OS Command Injection in ljharb/npm-lockfile
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
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 Low
CVSS: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 Low
CVSS: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 Critical
CVSS: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 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 3.8 Low
CVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N - CVSS 2.0
- 10.0 High
AV: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 Low
CVSS: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 Critical
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
npm-lockfilenpm |
2.0.3 up to 2.0.5 | 2.0.5 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE 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
huntr.dev/bounties/4f806dc9-2ecd-4e79-997e-5292f1bea9f1
github.com/ljharb/npm-lockfile/commit/bfdb84813260f0edbf759f2fde1e8c816c1478b8
nvd.nist.gov/vuln/detail/CVE-2022-0841
github.com/advisories/GHSA-cr6m-62pq-hmqh
github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0841.json
github.com/ljharb/npm-lockfile