{"id":"CVE-2022-0841","aliases":["CVE-2022-0841","GHSA-cr6m-62pq-hmqh"],"related":[],"kind":"vulnerability","state":"published","title":"OS Command Injection in ljharb/npm-lockfile","summary":"OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OS Command Injection in GitHub repository ljharb/npm-lockfile in v2.0.3 and v2.0.4.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Inyección de comandos del sistema operativo en el repositorio de GitHub ljharb/npm-lockfile en las versiones v2.0.3 y v2.0.4.","source":"nvd"}],"published":"2022-03-03T15:50:10.000Z","modified":"2026-06-17T04:21:21.170Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":3.8,"rating":"LOW"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":3.8,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","score":10,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"2.0.3","status":"affected"},{"version":"2.0.4","status":"affected"}],"vendor":"ljharb","product":"ljharb/npm-lockfile","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.3","status":"affected","fixed":"2.0.5"}],"ecosystem":"npm","package":"npm-lockfile","purl":"pkg:npm/npm-lockfile","source":"ghsa"},{"ranges":[{"status":"affected","version":"2.0.3"},{"status":"affected","version":"2.0.4"}],"vendor":"npm-lockfile_project","product":"npm-lockfile","cpe":"cpe:2.3:a:npm-lockfile_project:npm-lockfile:2.0.3:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://huntr.dev/bounties/4f806dc9-2ecd-4e79-997e-5292f1bea9f1","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ljharb/npm-lockfile/commit/bfdb84813260f0edbf759f2fde1e8c816c1478b8","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0841","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ljharb/npm-lockfile","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-0841","url":"https://www.cve.org/CVERecord?id=CVE-2022-0841","licence":"CVE Terms of Use","modified":"2024-08-02T23:40:04.446Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cr6m-62pq-hmqh","url":"https://github.com/advisories/GHSA-cr6m-62pq-hmqh","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:41.089Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-0841","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0841","licence":"Public domain","modified":"2026-06-17T04:21:21.170Z"}],"updatedAt":"2026-11-25T22:58:09.899Z","epss":{"score":0.02513,"percentile":0.85233,"date":"2026-12-01T12:00:22.000Z"}}