CVE-2022-0841 OS Command Injection in ljharb/npm-lockfile

Low 3.8 Published Updated

Attackers can execute arbitrary OS commands via the npm-lockfile library, requiring developers to upgrade to a patched version.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-0841?

CVE-2022-0841 is a low-severity command injection vulnerability in ljharb/npm-lockfile, published on 3 Mar 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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

Weakness: CWE-78

Which versions are affected by CVE-2022-0841?

2 open source packages ship an affected version, including npm-lockfile. It affects 1 product.

PackageAffectedFixed in
npm-lockfile npmFrom 2.0.32.0.5
npm-lockfile npmFrom 2.0.32.0.5

Products include Npm-Lockfile Project Npm-Lockfile.

How do I fix CVE-2022-0841?

Upgrade npm-lockfile to 2.0.5 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-0841 being exploited?

There is no known exploitation of CVE-2022-0841 in the wild and no public exploit code.

Sources

Also known as GHSA-cr6m-62pq-hmqh.

Is CVE-2022-0841 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free