Web Application
CVE-2026-73222 high CVSS 8.8

OS Command Injection in claude-code-templates (CVE-2026-73222)

Summary

OS command injection in claude-code-templates (CVE-2026-73222). Successful exploitation can lead to full system takeover. Exploitable via POST /api/execute. Mitigation: upgrade to 1.29.4 or later.

Original description

The description as published by the source.

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 f…

Source: NIST National Vulnerability Database NVD GitHub Advisory

AI summary

Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.

Claude Code Templatesの脆弱性により、バージョン1.29.4以前では、--studioオプションを使用して起動するサーバーがポート3444で全インターフェースにバインドされ、クロスオリジンリクエストが許可され、認証が不要です。これにより、悪意のある攻撃者はOSコマンドを任意に実行でき、開発者の特権でソースコードや資格情報、ローカルデータを危険にさらす可能性があります。

❓ What is the problem

Claude Code TemplatesのCLIツールの脆弱性。

📍 Affected scope

バージョン1.29.4以前のClaude Code Studioのサーバー。

🔥 Severity

攻撃者が任意のOSコマンドを実行できるため、システムの完全な制御が可能となり、高度なリスクがあります。

🔧 How to fix

バージョン1.29.4にアップデートすること。

🛡️ Workaround

情報なし

🔍 Detection

ポート3444で不審なアクセスを監視し、意図しないシェル実行を確認する。

Affected packages

npm claude-code-templates
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.29.4"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details