Summary
A missing authentication vulnerability in PraisonAI recipe serving can allow unauthenticated clients to access recipe execution, input, and output interfaces even when an operator enables API-key or JWT authentication. This may let remote attackers invoke connected tools and interact with agent workflows without presenting valid credentials.
Affected context
The issue occurs in PraisonAI recipe-serving deployments where an operator selects API-key or JWT authentication but the corresponding environment secret and recipe authentication value are absent. In that configuration, the installed middleware may fail open and forward requests instead of rejecting them, leaving recipe execution and related data surfaces exposed.
Exploit preconditions
- Attack surface: Network-accessible PraisonAI recipe-serving endpoints
- Required access: Ability to send requests to the exposed service; valid credentials may not be required
- Trigger point: Requests reaching recipe execution, input, or output handlers
- Why exploitation is possible: Authentication middleware forwards requests when both the expected environment secret and corresponding recipe value are missing
Why this happens
The underlying bug is a fail-open authentication design. Middleware is selected based on the operator's authentication choice, but missing authentication configuration is treated as a reason to pass requests through rather than as a configuration error or access denial.
This maps primarily to CWE-306: Missing Authentication for Critical Function, because sensitive recipe operations remain reachable without identity verification. It also relates to CWE-1188: Insecure Default Initialization of Resource, as absent security configuration produces an insecure runtime state.
Potential impact
- Unauthenticated users could execute recipes
- Attackers may submit or manipulate workflow inputs
- Sensitive recipe outputs could be exposed
- Connected tools could be invoked without authorization
- Downstream systems or data may be affected through agent actions
- The service could be abused for unauthorized processing or resource consumption
General mitigation guidance
Mitigation generally focuses on making authentication configuration fail closed and ensuring protected operations cannot run without verified identity.
Common defensive patterns include:
- Rejecting startup or requests when required authentication secrets are absent
- Treating missing, empty, or mismatched credentials as configuration errors
- Applying authentication and authorization checks at every recipe execution and tool-invocation boundary
- Using secure-by-default configurations that deny access until credentials and policy are explicitly valid
- Reducing input trust by validating authentication settings against a strict schema
- Running connected tools with least privilege and narrowly scoped service identities
- Keeping administrative and execution endpoints behind network access controls where practical
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis of authentication middleware for branches that forward requests when secrets or configured credentials are absent
- Code review checks for fail-open behavior, optional credential comparisons, and authentication bypass paths
- Integration tests that exercise protected endpoints with missing, empty, malformed, and incorrect credentials
- Policy enforcement requiring authentication configuration validation before service readiness
- Runtime monitoring for successful recipe execution or tool invocation requests that lack authenticated identity context
- Automated security review tools that flag missing-authentication and insecure-default patterns

