CVE-2026-25725: @anthropic-ai/claude-code Persistent Configuration Injection Vulnerability

@anthropic-ai/claude-code Updated 07 Feb 2026

Summary

06/02/2026
Yes i
High
7.7

CVE-2026-25725: Claude Code has Sandbox Escape via Persistent Configuration Injection in settings.json. Affects @anthropic-ai/claude-code versions < 2.1.2. Fixed in 2.1.2. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Claude Code is an advanced coding assistant developed by Anthropic AI, designed to enhance programming efficiency through intelligent suggestions and automation. It operates within a sandboxed environment to ensure that user code runs securely. However, a recent vulnerability has been identified that compromises the integrity of its sandboxing mechanism, specifically related to the handling of configuration files.

Vulnerability Detail

The vulnerability arises from Claude Code's bubblewrap sandboxing mechanism, which inadequately protects the .claude/settings.json configuration file when it is absent at startup. This oversight allows malicious code executed within the sandbox to create the settings.json file and inject persistent hooks, such as SessionStart commands. These hooks can execute with host privileges upon restarting Claude Code, potentially leading to unauthorized access and manipulation of the host system.

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

2.1.2

This is the first release that contains the fix.

npm install @anthropic-ai/claude-code@2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can ensure that the .claude/settings.json file exists and is properly secured with appropriate permissions to prevent unauthorized modifications until the package is updated.

Conclusion

The CVE-2026-25725 vulnerability in the @anthropic-ai/claude-code package highlights a significant issue with the handling of configuration files within its sandboxing mechanism. Users are strongly advised to update to version 2.1.2 or later to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for @anthropic-ai/claude-code →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.7, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If you do not update the package, your application remains vulnerable to potential exploitation, which could lead to unauthorized access and execution of malicious code.

While the primary risk is unauthorized access, there is a potential for data loss or corruption if malicious code is executed with host privileges.

The vulnerability was reported by a security researcher from hackerone.com/edbr, contributing to the security of the Claude Code application.

Related vulnerabilities

Recent vulnerabilities recorded for @anthropic-ai/claude-code.

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

2.1.2

This is the first release that contains the fix.

npm install @anthropic-ai/claude-code@2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback