CVE-2025-64755
📋 TL;DR
CVE-2025-64755 is a critical vulnerability in Claude Code versions before 2.0.31 that allows attackers to bypass read-only validation and write arbitrary files to the host system. This affects all users running vulnerable versions of Claude Code. The vulnerability stems from improper sed command parsing that enables file system manipulation.
💻 Affected Systems
- Claude Code
📦 What is this software?
Claude Code by Anthropic
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise through arbitrary file writes leading to remote code execution, data theft, or system destruction.
Likely Case
Unauthorized file modification leading to data corruption, privilege escalation, or persistence mechanisms.
If Mitigated
Limited impact if proper network segmentation and least privilege principles are enforced.
🎯 Exploit Status
The advisory suggests exploitation is straightforward once the sed parsing flaw is understood.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.0.31
Vendor Advisory: https://github.com/anthropics/claude-code/security/advisories/GHSA-7mv8-j34q-vp7q
Restart Required: Yes
Instructions:
1. Stop Claude Code service
2. Update to version 2.0.31 using your package manager or download from official source
3. Restart Claude Code service
4. Verify the update was successful
🔧 Temporary Workarounds
Disable Claude Code
linuxTemporarily disable Claude Code until patching is possible
sudo systemctl stop claude-code
sudo systemctl disable claude-code
Restrict file system access
linuxApply strict file permissions to limit Claude Code's write capabilities
sudo chmod -R 755 /path/to/claude-code/data
sudo chown -R root:root /path/to/claude-code
🧯 If You Can't Patch
- Isolate Claude Code instances in a restricted network segment with no internet access
- Implement strict file system monitoring and integrity checking on host systems
🔍 How to Verify
Check if Vulnerable:
Check Claude Code version - if it's below 2.0.31, the system is vulnerable
Check Version:
claude-code --version
Verify Fix Applied:
Confirm version is 2.0.31 or higher and test that file write restrictions are properly enforced
📡 Detection & Monitoring
Log Indicators:
- Unexpected file write operations by Claude Code process
- sed command execution with unusual parameters
- Permission denied errors for files that should be read-only
Network Indicators:
- Unusual outbound connections from Claude Code host
- File transfer patterns inconsistent with normal operation
SIEM Query:
process_name:"claude-code" AND (event_type:"file_write" OR command_line:"sed")