Summary
Claude Code Templates exposes an unauthenticated Studio server that passes attacker-controlled request values to shell-enabled child processes. An attacker who can reach the server, or who can cause a developer running Studio to access a malicious webpage, may execute operating-system commands with the developer's privileges.
Affected context
The issue occurs in the Claude Code Studio server started with the --studio option when it binds to all network interfaces, accepts cross-origin requests, and does not require authentication. Request fields used by task execution and agent installation can reach child-process creation with shell execution enabled, making the risk dependent on network reachability or browser-based access from a developer's session.
Exploit preconditions
- Attack surface: HTTP endpoints exposed by the Claude Code Studio server, including task execution and agent installation paths
- Required access: Network access to the Studio port, or the ability to cause a developer running Studio to send requests through a browser
- Trigger point: Processing attacker-controlled prompt or agent-name request fields
- Why exploitation is possible: The values reach
child_process.spawn()with shell execution enabled, allowing shell interpretation of untrusted input
Why this happens
The vulnerability results from incorporating request-controlled data into a child-process invocation configured for shell execution. When shell interpretation is enabled, metacharacters and command syntax in otherwise ordinary input can alter the command that Node.js executes.
This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with contributing weaknesses involving missing authentication (CWE-306) and insufficient protection against cross-origin requests (CWE-352).
Potential impact
- An attacker may execute arbitrary operating-system commands
- Source code, credentials, tokens, and local files could be accessed or modified
- The developer workstation or local development environment could be compromised
- Malicious changes could be introduced into projects, dependencies, or build workflows
- Follow-on access to connected services or repositories could occur
General mitigation guidance
Mitigation generally focuses on removing shell interpretation from process execution and treating all HTTP request values as untrusted.
Common defensive patterns include:
- Prefer direct executable-and-argument APIs with shell execution disabled
- Use fixed command and argument allowlists rather than composing commands from request data
- Validate agent identifiers and task parameters against strict schemas and expected character sets
- Bind local development services only to required interfaces and protect them with authentication
- Apply explicit origin and request protections where browser access is possible
- Run developer tooling with least privilege and isolate sensitive credentials from local services
- Prevent untrusted requests from selecting executables, arguments, or installation actions
How teams detect issues like this
Organizations can look for:
- Static-analysis findings involving
child_process.spawn(),exec(), or related APIs with shell execution enabled - Data-flow paths from HTTP request fields into process creation, command construction, or installation routines
- Code review signals such as unrestricted interpolation of request values into commands
- Local development servers that bind broadly, allow cross-origin requests, or expose administrative actions without authentication
- Runtime monitoring for unexpected child processes, command interpreters, agent installations, or outbound connections from the Studio process
- Policy checks requiring authentication and restricted network exposure for developer tooling
Automated code review and dependency-security tools may help identify unsafe process execution and exposed development services.

