An Evening with Claude (Code) sed-Based Command Safety Bypas... #1603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post details a command-execution protection bypass in Anthropic’s Claude Code CLI that leads to remote code execution (RCE) by abusing incomplete
sedexpression validation inside the BashCommand tool. The issue is tracked as CVE-2025-64755 and was fixed in Claude Code v2.0.31; version 2.0.25 was confirmed vulnerable.The author’s assessment goal was to show the risks ...
🔧 Technical Details
Bypassing anti-debugging in obfuscated Node.js CLIs
When reversing an obfuscated Node.js CLI like Claude Code’s
cli.js, start it with an initial breakpoint vianode --inspect-brk cli.jsand attach DevTools. Look for logic that readsprocess.execArgvor similar to detect debugging flags and abort. Patch those values at runtime in the DevTools console (e.g.,process.execArgs = []) before resuming execution. This lets you step through normally hidden security logic, without modifying the on-disk file.Converting an LLM-driven shell validator into a local fuzzing harness
For LLM shells that internally validate commands, use breakpoints to identify the function where the complete shell command string hits the security checks (e.g., BashCommand’s
checkPermissionspipeline). Once found, rename it for clarity and invoke it directly in the debugger console with arbitrary strings. This bypasses...🤖 Agent Actions
Summary:
AI-MCP-Servers.mdwith a dedicated section on Claude Code’s sed-based command validation bypass (CVE-2025-64755), covering anti-debug evasion, validator fuzzing, the multi-stage allow/deny pipeline, bypass payloads, and persistence/secret-theft impact via MCP or prompt-injection delivery channels.Tests: Not run (documentation-only changes).
Files Modified:
src/AI/AI-MCP-Servers.mdThis PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.