CVE-2025-52882: @anthropic ai/claude code Claude Code Improper Authorization Vulnerability

HIGH
Advisory Identifier: GHSA-9f65-56v6-gxw7
CWE-285 CWE-1385
Published
Advisory Summary

CVE-2025-52882 is a HIGH claude code improper authorization vulnerability (CWE-285: Improper Authorization) affecting @anthropic ai/claude code libraries in the npm ecosystem. The issue involves claude code improper authorization via websocket connections from arbitrary origins. Remediation is available by upgrading affected packages to version 1.0.24.

CVE-2025-52882 at a Glance

CVE Identifier CVE-2025-52882
GHSA Identifier GHSA-9f65-56v6-gxw7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-285: Improper Authorization
Affected Product @anthropic ai/claude code
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-52882

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.24
npm install @anthropic-ai/claude-code@1.0.24
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 CVE-2025-52882, 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.24), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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

Claude Code extensions in VSCode and forks (e.g., Cursor, Windsurf, and VSCodium) and JetBrains IDEs (e.g., IntelliJ, Pycharm, and Android Studio) are vulnerable to unauthorized websocket connections from an attacker when visiting attacker-controlled webpages. Claude Code for VSCode IDE extensions versions 0.2.116 through 1.0.23 are vulnerable. For Jetbrains IDE plugins, Claude Code [beta] versions 0.1.1 through 0.1.8 are vulnerable. In VSCode (and forks), exploitation would allow an attacker to read arbitrary files, see the list of files open in the IDE, get selection and diagnostics events from the IDE, or execute code in limited situations where a user has an open Jupyter Notebook and accepts a malicious prompt. In JetBrains IDEs, an attacker could get selection events, a list of open files, and a list of syntax errors. **Remediation** We released a patch for this issue on June 13th, 2025. Although Claude Code auto-updates when you launch it and auto-updates the extensions, you should take the following steps (the exact steps depend on your IDE). **VSCode, Cursor, Windsurf, VSCodium, and other VSCode forks** Extension Name: Claude Code for VSCode Instructions: 1. Open the list of Extensions (View->Extensions) 2. Look for Claude Code for VSCode among installed extensions 3. If you have a version < 1.0.24, click “Update” (or “Uninstall”) 4. Restart the IDE **All JetBrains IDEs including IntelliJ, PyCharm, and Android Studio** Plugin name: Claude Code [Beta] Instructions: 1. Open the Plugins list 2. Look for Claude Code [Beta] among installed extensions 3. Update (or Uninstall) the plugin if the version is < 0.1.9 4. Restart the IDE

CVE-2025-52882 Affected @anthropic ai/claude code Versions

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

References

Frequently Asked Questions

What is CVE-2025-52882?
CVE-2025-52882 is a security vulnerability in @anthropic ai/claude code involving Claude Code Improper Authorization via websocket connections from arbitrary origins under CWE-285: Improper Authorization.
Which @anthropic ai/claude code versions are affected?
Affected versions include releases prior to 1.0.24 across affected packages: @anthropic-ai/claude-code.
What version fixes CVE-2025-52882?
Upgrading to 1.0.24 (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.24. Upgrade your dependency to 1.0.24 or later.
What CWE is associated with CVE-2025-52882?
CVE-2025-52882 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2025-52882?
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-9f65-56v6-gxw7",
  "modified" : "2025-06-27T23:07:59Z",
  "published" : "2025-06-23T21:22:22Z",
  "aliases" : [ "CVE-2025-52882" ],
  "summary" : "Claude Code Improper Authorization via websocket connections from arbitrary origins",
  "details" : "Claude Code extensions in VSCode and forks (e.g., Cursor, Windsurf, and VSCodium) and JetBrains IDEs (e.g., IntelliJ, Pycharm, and Android Studio) are vulnerable to unauthorized websocket connections from an attacker when visiting attacker-controlled webpages. Claude Code for VSCode IDE extensions versions 0.2.116 through 1.0.23 are vulnerable. For Jetbrains IDE plugins, Claude Code [beta] versions 0.1.1 through 0.1.8 are vulnerable.  \n\nIn VSCode (and forks), exploitation would allow an attacker to read arbitrary files, see the list of files open in the IDE, get selection and diagnostics events from the IDE, or execute code in limited situations where a user has an open Jupyter Notebook and accepts a malicious prompt. In JetBrains IDEs, an attacker could get selection events, a list of open files, and a list of syntax errors.\n\n**Remediation**\n\nWe released a patch for this issue on June 13th, 2025. Although Claude Code auto-updates when you launch it and auto-updates the extensions, you should take the following steps (the exact steps depend on your IDE).\n\n**VSCode, Cursor, Windsurf, VSCodium, and other VSCode forks**\nExtension Name: Claude Code for VSCode\n\nInstructions:\n\n1. Open the list of Extensions (View->Extensions)\n2. Look for Claude Code for VSCode among installed extensions\n3. If you have a version < 1.0.24, click “Update” (or “Uninstall”)\n4. Restart the IDE \n\n**All JetBrains IDEs including IntelliJ, PyCharm, and Android Studio**\nPlugin name: Claude Code [Beta]\n\nInstructions:\n\n1. Open the Plugins list\n2. Look for Claude Code [Beta] among installed extensions\n3. Update (or Uninstall) the plugin if the version is < 0.1.9\n4. Restart the IDE",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@anthropic-ai/claude-code"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.116"
      }, {
        "fixed" : "1.0.24"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-9f65-56v6-gxw7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-52882"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/anthropics/claude-code"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1385", "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-23T21:22:22Z",
    "nvd_published_at" : "2025-06-24T20:15:26Z"
  }
}