CVE-2023-37478 pnpm incorrectly parses tar archives relative to specification

High 7.5 Published Updated

Attackers can distribute malicious packages that appear safe on npm but execute code when installed via pnpm due to incorrect tar parsing.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-37478?

CVE-2023-37478 is a high-severity vulnerability in pnpm, published on 1 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

pnpm is a package manager. It is possible to construct a tarball that, when installed via npm or parsed by the registry is safe, but when installed via pnpm is malicious, due to how pnpm parses tar archives. This can result in a package that appears safe on the npm registry or when installed via npm being replaced with a compromised or malicious version when installed via pnpm. This issue has been patched in version(s) 7.33.4 and 8.6.8.

Weakness: CWE-284

Which versions are affected by CVE-2023-37478?

34 open source packages ship an affected version, including @pnpm/exe, @pnpm/cafs and @pnpm/linux-arm64. It affects 1 product.

PackageAffectedFixed in
@pnpm/exe npmAll versions7.33.4
@pnpm/exe npmAll versions7.33.4
@pnpm/exe npmFrom 8.0.08.6.8
@pnpm/exe npmFrom 8.0.08.6.8
@pnpm/cafs npmAll versions7.0.5
@pnpm/cafs npmAll versions7.0.5
28 more packages
@pnpm/linux-arm64 npmAll versions7.33.4
@pnpm/linux-arm64 npmAll versions7.33.4
@pnpm/linux-arm64 npmFrom 8.0.08.6.8
@pnpm/linux-arm64 npmFrom 8.0.08.6.8
@pnpm/linux-x64 npmAll versions7.33.4
@pnpm/linux-x64 npmAll versions7.33.4
@pnpm/linux-x64 npmFrom 8.0.08.6.8
@pnpm/linux-x64 npmFrom 8.0.08.6.8
@pnpm/linuxstatic-arm64 npmAll versions7.33.4
@pnpm/linuxstatic-arm64 npmAll versions7.33.4
@pnpm/linuxstatic-arm64 npmFrom 8.0.08.6.8
@pnpm/linuxstatic-arm64 npmFrom 8.0.08.6.8
@pnpm/macos-arm64 npmAll versions7.33.4
@pnpm/macos-arm64 npmAll versions7.33.4
@pnpm/macos-arm64 npmFrom 8.0.08.6.8
@pnpm/macos-arm64 npmFrom 8.0.08.6.8
@pnpm/macos-x64 npmAll versions7.33.4
@pnpm/macos-x64 npmAll versions7.33.4
@pnpm/macos-x64 npmFrom 8.0.08.6.8
@pnpm/macos-x64 npmFrom 8.0.08.6.8
@pnpm/win-x64 npmAll versions7.33.4
@pnpm/win-x64 npmAll versions7.33.4
@pnpm/win-x64 npmFrom 8.0.08.6.8
@pnpm/win-x64 npmFrom 8.0.08.6.8
pnpm npmAll versions7.33.4
pnpm npmAll versions7.33.4
pnpm npmFrom 8.0.08.6.8
pnpm npmFrom 8.0.08.6.8

Products include Pnpm Pnpm.

How do I fix CVE-2023-37478?

Upgrade @pnpm/exe to a fixed version for your release line: 7.33.4 or 8.6.8.

Is CVE-2023-37478 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-37478 exists.

Public exploit code: 2 proofs of concept on GitHub.

Sources

Also known as GHSA-5r98-f33j-g8h7.

Is CVE-2023-37478 in your software?

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

Check your SBOMs for free