CVE-2025-8022
JavaScript vulnerability analysis and mitigation

Overview

Versions of the package bun after 0.0.12 are vulnerable to an OS Command Injection vulnerability in the $ shell API. The vulnerability was discovered on March 23, 2025, and publicly disclosed on July 22, 2025. This security issue specifically affects the widely known and actively developed 'Bun' JavaScript runtime, not the older project that previously claimed the 'bun' name on NPM at versions 0.0.12 and below (Snyk Advisory).

Technical details

The vulnerability stems from improper neutralization of user input in the $ shell API. When user input includes command-line arguments or shell metacharacters, it can lead to unintended command execution. The vulnerability has been assigned a CVSS v4.0 score of 8.7 (HIGH) and CVSS v3.1 score of 8.8 (HIGH), indicating significant potential impact. The vulnerability is classified as CWE-78: Improper Neutralization of Special Elements used in an OS Command (Snyk Advisory).

Impact

The vulnerability allows attackers to execute arbitrary commands by manipulating command-line arguments. This can lead to significant impacts on system confidentiality, integrity, and availability. The attack can be performed over the network with low attack complexity, requiring no special privileges, though it does need partial user interaction (Snyk Advisory).

Mitigation and workarounds

Currently, there is no fixed version available for the affected package. Users should exercise caution when handling user input that gets passed to the $ shell API and implement proper input validation and sanitization mechanisms (Snyk Advisory).

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-turbopack
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