GHSA-ph6w-f82w-28w6: @anthropic ai/claude code Claude Code Vulnerable To Arbitrary Vulnerability

HIGH
CWE-94
Published
Advisory Summary

GHSA-ph6w-f82w-28w6 is a HIGH claude code vulnerable to arbitrary vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @anthropic ai/claude code libraries in the npm ecosystem. The issue involves claude code vulnerable to arbitrary code execution due to insufficient startup warning. Remediation is available by upgrading affected packages to version 1.0.87.

GHSA-ph6w-f82w-28w6 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-ph6w-f82w-28w6
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product @anthropic ai/claude code
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-ph6w-f82w-28w6

To remediate this vulnerability, upgrade all affected @anthropic ai/claude code dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@anthropic-ai/claude-code fixed: 1.0.87
npm install @anthropic-ai/claude-code@1.0.87
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @anthropic-ai/claude-code

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-ph6w-f82w-28w6, inspect your project dependencies using npm:

npm ls @anthropic-ai/claude-code

Analyze the terminal output to locate any version of @anthropic ai/claude code in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.87), your application is affected.

Note: The npm ls @anthropic-ai/claude-code command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @anthropic ai/claude code, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

When Claude Code was started in a new directory, it displayed a warning asking, "Do you trust the files in this folder?". This warning did not properly document that selecting "Yes, proceed" would allow Claude Code to execute files in the folder without additional confirmation. This may not have been clear to a user so we have updated the warning to clarify this functionality.  Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version. Thank you to https://hackerone.com/avivdon for reporting this issue!

GHSA-ph6w-f82w-28w6 Affected @anthropic ai/claude code Versions

1 component(s)
Fixed Versions:
1.0.87
Product / Package Ecosystem Affected Versions Fixed Version
@anthropic-ai/claude-code
npm
< 1.0.87
1.0.87

References

Frequently Asked Questions

What is GHSA-ph6w-f82w-28w6?
GHSA-ph6w-f82w-28w6 is a security vulnerability in @anthropic ai/claude code involving Claude Code Vulnerable to Arbitrary Code Execution Due to Insufficient Startup Warning under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which @anthropic ai/claude code versions are affected?
Affected versions include releases prior to 1.0.87 across affected packages: @anthropic-ai/claude-code.
What version fixes GHSA-ph6w-f82w-28w6?
Upgrading to 1.0.87 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @anthropic-ai/claude-code affected?
Yes, @anthropic-ai/claude-code is affected in releases prior to 1.0.87. Upgrade your dependency to 1.0.87 or later.
What CWE is associated with GHSA-ph6w-f82w-28w6?
GHSA-ph6w-f82w-28w6 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for GHSA-ph6w-f82w-28w6?
Run the dependency tree command: 'npm ls @anthropic-ai/claude-code'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ph6w-f82w-28w6",
  "modified" : "2025-09-03T18:06:59Z",
  "published" : "2025-09-03T18:06:31Z",
  "aliases" : [ ],
  "summary" : "Claude Code Vulnerable to Arbitrary Code Execution Due to Insufficient Startup Warning",
  "details" : "When Claude Code was started in a new directory, it displayed a warning asking, \"Do you trust the files in this folder?\". This warning did not properly document that selecting \"Yes, proceed\" would allow Claude Code to execute files in the folder without additional confirmation. This may not have been clear to a user so we have updated the warning to clarify this functionality. \n\nUsers on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nThank you to https://hackerone.com/avivdon for reporting this issue!",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@anthropic-ai/claude-code"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.87"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-ph6w-f82w-28w6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/anthropics/claude-code"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-03T18:06:31Z",
    "nvd_published_at" : null
  }
}