CVE-2026-73222 is a high-severity (CVSS 8.8) OS Command Injection vulnerability in claude-code-templates. A fix is available for claude-code-templates — see the affected versions and patch details below.
Claude Code Templates: Unauthenticated OS command injection (RCE) in Claude Code Studio server (--studio)
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-73222.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-73222 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 379,145 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
claude-code-templatesnpmDescription
Summary
npx claude-code-templates --studio launches "Claude Code Studio", an Express HTTP server (cli-tool/src/sandbox-server.js, default port 3444) that binds to all interfaces (0.0.0.0), sets Access-Control-Allow-Origin: *, and requires no authentication. Two POST endpoints pass attacker-controlled request-body fields into child_process.spawn(..., { shell: true }). Because shell: true makes Node join the argv array into a single sh -c string, the fields are parsed by the shell and metacharacters execute. Any unauthenticated attacker who can reach the port — a malicious web page the developer visits, or anyone on the same LAN — can execute arbitrary OS commands on the developer's machine.
Details
In cli-tool/src/sandbox-server.js:
app.listen(PORT, ...)is called with no host argument, so the server listens on0.0.0.0/::(reachable from the LAN, not just localhost).- The CORS middleware sends
Access-Control-Allow-Origin: *and answers the preflightOPTIONSfor any origin, so a browser will deliver cross-origin POSTs to it. - There is no authentication on any endpoint.
The vulnerable sinks:
POST /api/execute— thepromptbody field flows intoexecuteLocalTask():const child = spawn('claude', [finalPrompt], { /* ... */ shell: true }); The only validation on prompt is a length check (>= 10 chars). With shell: true, finalPrompt is interpreted by the shell.- POST /api/install-agent — the agentName body field: const child = spawn('npx', ['claude-code-templates@latest', '--agent', agentName, '--yes'], { /* ... */ shell: true });
- agentName is used unvalidated. (The same unsafe pattern is also reachable through /api/execute's agent field via checkAndInstallAgent().)
Root cause: spawn(cmd, argsArray, { shell: true }) does not keep argsArray as separate argv entries — Node builds cmd + ' ' + argsArray.join(' ') and runs it via sh -c, so every element is subject to shell parsing.
PoC
Victim
npx claude-code-templates --studio # server on 0.0.0.0:3444
Attacker (another LAN host, or a malicious web page fetch(), or locally)
curl -s -X POST http://127.0.0.1:3444/api/execute
-H 'Content-Type: application/json'
--data '{"prompt":"aaaaaaaaaa; touch /tmp/CCT_RCE_PROOF","mode":"local"}'
curl -s -X POST http://127.0.0.1:3444/api/install-agent
-H 'Content-Type: application/json'
--data '{"agentName":"x; touch /tmp/CCT_AGENT_PROOF #"}'
ls -la /tmp/CCT_RCE_PROOF /tmp/CCT_AGENT_PROOF # both created => injected commands ran The aaaaaaaaaa padding satisfies the 10-char minimum, then ; (or $(...), or backticks) starts the injected command. claude/npx do not even need to be installed — the injected segment runs regardless.
Confirmed at runtime on v1.28.13 (Node 22, Linux): both marker files were created, the server listened on *:3444, and an OPTIONS preflight from Origin: https://evil.example returned 200 with Access-Control-Allow-Origin: *.
Impact
Unauthenticated remote code execution (CWE-78) on any machine running --studio. Two reachability paths:
- Drive-by: a developer running --studio who visits an attacker-controlled web page — the page's cross-origin fetch() (Content-Type application/json) passes the wildcard CORS preflight and delivers the POST, achieving RCE with no other interaction.
- LAN: because the server binds 0.0.0.0, anyone on the same network (office, co-working space, public Wi-Fi) can hit port 3444 directly.
Impact is full compromise of the developer's user account (arbitrary command execution with the developer's privileges): source code, SSH keys, cloud credentials, and .env secrets.
Suggested fix
- Remove shell: true from all three spawns so arguments stay discrete argv entries (kills the injection).
- Validate agentName against a strict allowlist (^[A-Za-z0-9._/-]+$).
- Bind to loopback only (app.listen(PORT, '127.0.0.1', ...)).
- Replace the wildcard CORS with a same-origin allowlist and reject other origins.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | claude-code-templates | all versions | 1.29.4npm install claude-code-templates@1.29.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for claude-code-templates, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update claude-code-templates to 1.29.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-73222 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-73222 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-73222. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-73222 in your dependencies?
O3 Security finds CVE-2026-73222 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.