Skip to content

← Actionable
High, CVSS 7.5amended

pnpm incorrectly parses tar archives relative to specification

CVE-2023-37478GHSA-5r98-f33j-g8h7

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@pnpm/linuxstatic-arm64 8.6.8, 7.33.4; @pnpm/cafs 7.0.5; pnpm 8.6.8, 7.33.4; @pnpm/exe 8.6.8, 7.33.4; @pnpm/macos-arm64 8.6.8, 7.33.4; 4 more packages under Affected packages), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm @pnpm/linuxstatic-arm64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/cafs

    Affected
    < 7.0.5
    Fixed in
    7.0.5
  • npm pnpm

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/exe

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/macos-arm64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/linux-x64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/win-x64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/linux-arm64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4
  • npm @pnpm/macos-x64

    Affected
    < 7.33.4>= 8.0.0, < 8.6.8
    Fixed in
    8.6.8, 7.33.4

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
  • CVE-2023-37478: 1.20% estimated exploitation activity in the next 30 days; percentile 68.22 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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. Details The TAR format is an append-only archive format, and as such, the specification for how to update a file is to add a new record to the end with the updated version of the file. This means that it is completely valid for an archive to contain multiple copies of, say, package.json, and the expected behavior when extracting is that all versions other than the last get ignored. This is further complicated by that during tarball extraction, all package managers are configured to drop the first path component, so collisions can be created simply by using multiple root folders in the archive, even without performing updates. When pnpm extracts a tar archive via tar-stream, it appears to extract only the first file of a given name and discards all subsequent files with the same name. PoC Create a…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-5r98-f33j-g8h7

  2. Revision 1 · created ·

    Published from osv record GHSA-5r98-f33j-g8h7

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2023-37478

Advisory: pnpm incorrectly parses tar archives relative to specification
IDs: CVE-2023-37478, GHSA-5r98-f33j-g8h7
Record: https://patchnext.com/advisories/cve-2023-37478 (revision 2, source checked 26 Oct 2026, 12:29 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @pnpm/linuxstatic-arm64 8.6.8, 7.33.4; @pnpm/cafs 7.0.5; pnpm 8.6.8, 7.33.4; @pnpm/exe 8.6.8, 7.33.4; @pnpm/macos-arm64 8.6.8, 7.33.4; @pnpm/linux-x64 8.6.8, 7.33.4; @pnpm/win-x64 8.6.8, 7.33.4; @pnpm/linux-arm64 8.6.8, 7.33.4; @pnpm/macos-x64 8.6.8, 7.33.4. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @pnpm/linuxstatic-arm64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/cafs: affected < 7.0.5; fixed in 7.0.5
- npm pnpm: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/exe: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/macos-arm64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/linux-x64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/win-x64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/linux-arm64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4
- npm @pnpm/macos-x64: affected < 7.33.4; >= 8.0.0, < 8.6.8; fixed in 8.6.8, 7.33.4

## Suggested inspection (read-only)
- `npm ls @pnpm/linuxstatic-arm64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/cafs --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls pnpm --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/exe --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/macos-arm64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/linux-x64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/win-x64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/linux-arm64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @pnpm/macos-x64 --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @pnpm/linuxstatic-arm64, @pnpm/cafs, pnpm, @pnpm/exe, @pnpm/macos-arm64, @pnpm/linux-x64, @pnpm/win-x64, @pnpm/linux-arm64, @pnpm/macos-x64.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-5r98-f33j-g8h7 (OSV record GHSA-5r98-f33j-g8h7 lists affected ranges: npm pnpm >=0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 <8.6.8…)
- Verified: https://github.com/advisories/GHSA-5r98-f33j-g8h7 (GitHub-reviewed advisory GHSA-5r98-f33j-g8h7 lists affected ranges: npm pnpm >=0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 =8.0.0 =0 <7.0.5)

Commands are suggestions: review each one before running it.

Loading voting…