CVE-2023-37478
JavaScript vulnerability analysis and mitigation

Overview

A critical vulnerability (CVE-2023-37478) was discovered in pnpm, a package manager, affecting versions prior to 7.33.4 and versions 8.0.0 through 8.6.8. The vulnerability relates to how pnpm incorrectly parses tar archives, allowing the construction of tarballs that appear safe when installed via npm or parsed by the registry but become malicious when installed via pnpm. This vulnerability was disclosed on August 1, 2023 (GitHub Advisory).

Technical details

The vulnerability stems from pnpm's handling of the TAR format, which is an append-only archive format. According to the specification, when updating a file in a TAR archive, a new record should be added to the end with the updated version, and during extraction, all versions except the last should be ignored. However, pnpm's implementation using tar-stream extracts only the first file of a given name and discards subsequent files with the same name, contrary to the specification. This behavior is particularly problematic because package managers are configured to drop the first path component during tarball extraction, allowing collisions through multiple root folders in the archive (GitHub Advisory).

Impact

The vulnerability 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 discrepancy in package content could lead to the execution of malicious code or the installation of vulnerable dependencies without the user's knowledge (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in pnpm versions 7.33.4 and 8.6.8. Users are strongly advised to upgrade to these or later versions. The fix ensures that when the same file is appended multiple times into a tarball, the last occurrence is selected when unpacking the tarball (Release Notes, Release Notes).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react-server-dom-webpack
NoYesDec 03, 2025
CVE-2025-66032HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesDec 03, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66404MEDIUM6.4
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management