CVE-2026-24052: Domain Validation Bypass in @anthropic-ai/claude-code Allows Automatic Requests to Attacker-Controlled Domains
Summary
CVE-2026-24052: Claude Code contained insufficient URL validation in its trusted domain verification mechanism for WebFetch requests. Affects @anthropic-ai/claude-code versions < 1.0.111. Fixed in 1.0.111. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Claude Code is a package developed by Anthropic AI that facilitates various functionalities, including web requests and data handling. It is widely used in applications that require reliable domain verification for fetching resources. However, a recent vulnerability has been identified that compromises its trusted domain verification mechanism, potentially exposing users to security risks.
Vulnerability Detail
The vulnerability arises from insufficient URL validation in Claude Code's trusted domain verification for WebFetch requests. The application employs a 'startsWith()' function to validate domains, which can be exploited by attackers to register subdomains that pass this validation check. For instance, a domain like 'modelcontextprotocol.io.example.com' could be accepted as valid, allowing attackers to send automatic requests to their controlled domains without user consent. This could lead to severe consequences, including data exfiltration and unauthorized access to sensitive information.
How To Fix
Latest published version: 2.1.308 as of 23 Oct 2026
npm install @anthropic-ai/claude-code@2.1.308
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.0.111
This is the first release that contains the fix.
npm install @anthropic-ai/claude-code@1.0.111
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can manually inspect and restrict the domains that their application interacts with, ensuring that only trusted domains are allowed. However, this is not a long-term solution and updating the package is strongly recommended.
Conclusion
The identified vulnerability in Claude Code poses significant risks due to its domain validation bypass. Users are strongly encouraged to update to the patched version to mitigate these risks. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.
See every vulnerability recorded for @anthropic-ai/claude-code →
FAQ
The vulnerability is a domain validation bypass that allows attackers to exploit insufficient URL validation, leading to potential data exfiltration.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground.
If immediate updates are not feasible, ensure to restrict domain access manually and monitor your application for any suspicious activity.
The CVSS score for this vulnerability is 7.1, indicating a high severity level.
The vulnerability was reported by a user on HackerOne, specifically user 47sid-praetorian.
References
Related vulnerabilities
Recent vulnerabilities recorded for @anthropic-ai/claude-code.