Summary
Yeger's turbo-graph package exposes a Next.js API endpoint that accepts task execution requests without authentication or authorization. An adjacent-network attacker who can reach the embedded server may run tasks defined in the victim repository with the privileges of the developer's operating-system account.
Affected context
The vulnerability occurs in turbo-graph deployments where the embedded Next.js server listens on all network interfaces, including the default 0.0.0.0:29312 address. The /api/run endpoint accepts task-related query parameters and can pass selected task names to the Turbo CLI without requiring identity verification, authorization checks, CSRF defenses, or an allowlist of permitted tasks.
Exploit preconditions
- Attack surface: The embedded turbo-graph HTTP server and its /api/run endpoint
- Required access: Network connectivity to the listening server, typically from an adjacent network position
- Trigger point: An unauthenticated request that causes the endpoint to process attacker-selected task parameters
- Why exploitation is possible: The server exposes a task-execution capability without verifying the caller or restricting task names to an approved set
Why this happens
The underlying flaw is missing authentication and authorization around a sensitive task-execution endpoint. Although the use of an argument array helps prevent conventional shell metacharacter injection, it does not prevent unauthorized callers from selecting legitimate tasks defined in the repository. This behavior maps to CWE-306: Missing Authentication for Critical Function, because a network-accessible operation with developer-level effects is available without establishing the caller's identity.
Potential impact
- An attacker may execute repository-defined tasks with the developer user's privileges
- Sensitive environment variables, configuration, or repository data could be exposed
- Files or development infrastructure could be modified
- Build, deployment, or automation workflows could be abused
- Availability could be reduced through destructive or resource-intensive tasks
- Compromise could extend to connected systems when the developer account has broader access
General mitigation guidance
Mitigation generally focuses on reducing exposure of task-execution interfaces and enforcing authorization before any task is started.
Common defensive patterns include:
- Bind development servers to loopback or a deliberately restricted interface by default
- Require strong authentication and authorization for execution endpoints
- Enforce CSRF protections when browser-based sessions can reach the endpoint
- Apply an explicit allowlist of safe tasks and validate task arguments against a strict schema
- Run development tooling with least-privilege operating-system accounts and isolated credentials
- Separate interactive developer services from sensitive repositories and infrastructure
- Avoid exposing task runners to shared or adjacent networks unless access controls are enforced
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static analysis rules for unauthenticated routes that invoke process-spawning or task-runner APIs
- Code review checks for servers binding to all interfaces by default
- Searches for request parameters flowing into process execution without authorization or allowlist validation
- Dynamic testing that verifies protected endpoints reject unauthenticated and cross-site requests
- Network policy reviews confirming that development servers are not broadly reachable
- Automated security review tools that flag sensitive operations exposed through unauthenticated HTTP handlers

