Browse / MCP and Tool Server Flaws / CVE-2025-52882
Claude Code Improper Authorization via websocket connections from arbitrary origins
- Class
- MCP and Tool Server Flaws (filed by a model that read the advisory)
- Technique
- Cross-site request forgery
- Also involves
- Tool and Agent Misuse
- Affected
- @anthropic-ai/claude-code (npm)
- CVSS
- 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
- EPSS
- 0.4% chance of exploitation in 30 days
How it works, in short
A malicious webpage opens a websocket to the local Claude Code IDE server, which accepts it without checking origin, letting it read files and IDE state. (Our summary, written by a model. The source text is below.)
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.
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:
- Open the list of Extensions (View->Extensions)
- Look for Claude Code for VSCode among installed extensions
- If you have a version < 1.0.24, click “Update” (or “Uninstall”)
- Restart the IDE
All JetBrains IDEs including IntelliJ, PyCharm, and Android Studio
Plugin name: Claude Code [Beta]
Instructions:
- Open the Plugins list
- Look for Claude Code [Beta] among installed extensions
- Update (or Uninstall) the plugin if the version is < 0.1.9
- Restart the IDE
References
- https://github.com/anthropics/claude-code/security/advisories/GHSA-9f65-56v6-gxw7
- https://nvd.nist.gov/vuln/detail/CVE-2025-52882
- https://github.com/anthropics/claude-code
Source: GitHub Advisory Database, used under CC BY 4.0.