Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

GHSA-79wm-x847-7cvg — claude-code-templates

HIGHFix: davila7/claude-code-templates@bc4618b

GHSA-79wm-x847-7cvg 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)

Also known asCVE-2026-73222
Published
Sep 3, 2026
Updated
Sep 3, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 26, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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 GHSA-79wm-x847-7cvg.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs22th percentile — riskier than 22% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-79wm-x847-7cvg by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

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.

0other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
claude-code-templatesnpm
7Kdownloads / week

Description

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 on 0.0.0.0 / :: (reachable from the LAN, not just localhost).
  • The CORS middleware sends Access-Control-Allow-Origin: * and answers the preflight OPTIONS for any origin, so a browser will deliver cross-origin POSTs to it.
  • There is no authentication on any endpoint.

The vulnerable sinks:

  1. POST /api/execute — the prompt body field flows into executeLocalTask():
    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.
    
    
  2. POST /api/install-agent — the agentName body field: const child = spawn('npx', ['claude-code-templates@latest', '--agent', agentName, '--yes'], { /* ... */ shell: true });
  3. 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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmclaude-code-templatesall versions1.29.4npm install claude-code-templates@1.29.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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 GHSA-79wm-x847-7cvg is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### 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 malici
O3 Security · Impact-Aware SCA

Is GHSA-79wm-x847-7cvg in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-79wm-x847-7cvg: RCE (High 8.8) | O3 Security