Summary
PraisonAI exposes an unauthenticated jobs endpoint that accepts attacker-controlled agent configuration and approval data. A remote attacker may use this behavior to make a configured language-model agent invoke operating-system commands without credentials or operator interaction.
Affected context
The vulnerability occurs in PraisonAI deployments that expose the /api/v1/runs Jobs API and allow requests to control agent YAML and approval-related fields. Risk is highest when the configured agent can access critical tools such as execute_command, because approval checks may treat attacker-supplied data as authorization before enforcing operator consent.
Exploit preconditions
- Attack surface: Network-accessible POST
/api/v1/runsAPI - Required access: No authentication or prior credentials
- Trigger point: Submission of a job containing attacker-controlled agent configuration and approval data
- Why exploitation is possible: The API trusts client-provided approval state and evaluates it before reliably enforcing authorization for critical tool execution
Why this happens
The issue combines missing authentication with an authorization bypass in a security-sensitive workflow. The Jobs API accepts unauthenticated requests, while attacker-controlled approval data can cause a critical tool to be treated as approved before the @require_approval control is applied. This maps primarily to CWE-306: Missing Authentication for Critical Function, with CWE-863: Incorrect Authorization also applying because the system fails to enforce approval based on a trusted security context.
Potential impact
- An unauthenticated attacker could cause arbitrary operating-system commands to run
- The application host or worker environment may be compromised
- Sensitive files, credentials, or environment data could be accessed
- Attackers could modify application data or establish persistence
- Connected services and downstream systems could be exposed to lateral movement
General mitigation guidance
Mitigation generally focuses on establishing authentication and authorization before accepting or executing agent jobs.
Common defensive patterns include:
- Require strong authentication for job-submission endpoints by default
- Enforce authorization server-side using trusted session or policy context
- Treat approval fields supplied by clients as untrusted metadata, not authorization
- Apply approval checks before dispatching any critical tool
- Use explicit allowlists for tools, arguments, and agent capabilities
- Disable operating-system command tools unless they are required
- Run agents with least privilege, isolated permissions, and restricted network access
- Require operator confirmation through a separate trusted control channel for high-risk actions
How teams detect issues like this
High-level detection can combine:
- Static analysis for unauthenticated routes that invoke job execution or tool dispatch
- Code review checks for client-controlled approval, trust, or privilege fields
- Tests verifying that every critical tool requires server-side authorization
- API policy enforcement requiring authentication and authorization on job-submission endpoints
- Runtime monitoring for anonymous requests, unusual agent definitions, and command-tool invocation
- Audit logs correlating request identity, approval decisions, selected tools, and executed actions
Automated security review tools may help identify routes where authentication middleware is absent or where authorization decisions depend on request-body values.

