/

CVE-2026-47393

Severity:

CRITICAL RISK

(9.8)

Missing Auth (CWE-306) in PraisonAI API Generator

CVE-2026-47393

Deferred

Vulnerability type

Category:

Missing Authentication / Access Control

CWE:

CWE-306, CWE-1188

Impact:

Unauthenticated Remote Access to AI Orchestration APIs

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

PraisonAI's code generator produces a Flask API server that exposes LLM orchestration endpoints over 0.0.0.0 with authentication disabled by default.

When users follow the quickstart instructions, the generated /chat and /agents endpoints accept arbitrary JSON, run praisonai.run() using in-process API key materials, and do not enforce any access control.

Affected context

This vulnerability affects PraisonAI deployments created via the documented quickstart flow (praisonai deploy --type api) where the generated Flask server:

  • Binds to 0.0.0.0 (network-accessible from other hosts),
  • Exposes /chat and /agents endpoints,
  • Uses praisonai.run() on user-supplied JSON,
  • Inherits API keys and related secrets from the process environment.

In these configurations, authentication is disabled by default unless consciously turned on via APIConfig(auth_enabled=True, auth_token=...), making internet-exposed instances particularly risky.

Exploit preconditions

  • Attack surface: Network-accessible Flask API server generated by PraisonAI.
  • Required access: Ability to reach the host and port where the server listens (commonly over the public internet when bound to 0.0.0.0).
  • Trigger point: Sending HTTP requests to /chat or /agents with crafted JSON payloads.
  • Why exploitation is possible: The generated server does not enforce authentication or authorization by default (CWE-306), and the configuration defaults leave auth_enabled=False, resulting in unrestricted remote invocation of LLM orchestration flows and use of embedded credentials (CWE-1188: Insecure Default Initialization).

Why this happens

The underlying bug class is missing enforcement of authentication and authorization controls in a network-exposed service, compounded by insecure default configuration. The API generator's template initializes APIConfig with auth_enabled=False, emitting a Flask app that listens on 0.0.0.0 and exposes powerful orchestration endpoints without any access control.

This maps to CWE-306 (Missing Authentication for Critical Function) because the /chat and /agents endpoints perform privileged actions—invoking LLM workflows using environment-based API keys—but are callable by any remote party. It also aligns with CWE-1188 (Insecure Default Initialization of Resource) as the default configuration is unsafe and requires explicit, opt-in changes to enable authentication.

Potential impact

  • Unauthenticated users may remotely drive LLM multi-agent workflows using the deployment's API keys.
  • Attackers could exfiltrate or indirectly abuse sensitive model API keys and other environment-based secrets.
  • Generated agents can be manipulated to perform unwanted actions, such as data extraction or integration abuse in connected systems.
  • The service may be consumed for large volumes of requests, causing cost inflation, resource exhaustion, or denial-of-service conditions.
  • Downstream systems integrated with PraisonAI agents could be misconfigured, probed, or receive malicious instructions via orchestrated prompts.

General mitigation guidance

Effective mitigation focuses on establishing secure defaults and enforcing access control at the API boundary. Recommended patterns include:

  • Treat any generated API server as an internet-facing service and require authentication for all sensitive endpoints.
  • Configure APIConfig or equivalent constructs to enable access control by default, using strong, rotated tokens or integrating with existing identity providers.
  • Avoid binding to 0.0.0.0 unless protected behind API gateways, firewalls, or reverse proxies that enforce authentication and rate limits.
  • Minimize the exposure of secrets in process environments; use restricted execution roles and scoped credentials to reduce blast radius.
  • Implement least-privilege for agents and workflows so that even authenticated requests cannot arbitrarily access all backend systems.

How teams detect issues like this

Organizations can identify this class of issues through a combination of configuration review and application security checks:

  • Inspect generated code templates for authentication and authorization guards on /chat, /agents, and similar endpoints.
  • Use static analysis and policy-as-code to flag API servers that bind to 0.0.0.0 without access control middleware or token validation logic.
  • Incorporate security-focused code review steps in CI/CD to ensure that any scaffolding or generators produce secure-by-default configurations.
  • Monitor runtime logs and network telemetry for unusual unauthenticated traffic patterns or high-volume usage from unknown sources.
  • Leverage automated tools that scan for insecure default settings, missing auth decorators, or public-facing endpoints handling sensitive operations.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/ef79b7a0561796ad9807f0f09538c25cc78d3619
github.comgithub.com/MervinPraison/PraisonAI/pull/1685
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-8444-4fhq-fxpq
github.comgithub.com/advisories/GHSA-6rmh-7xcm-cpxj

Frequently asked

questions

Yes. When the generated PraisonAI Flask server binds to 0.0.0.0 and is reachable over the network, any remote party can call /chat and /agents without authentication.

An attacker only needs network access to the listening host and port. No valid credentials or prior foothold in the environment are required if authentication remains disabled.

Enforce authentication and authorization at the API boundary by enabling auth_enabled (or equivalent) and requiring strong tokens or delegated identity for all requests. Additionally, avoid insecure defaults that expose powerful endpoints without protection.

Design code generators and scaffolding tools with secure-by-default settings, perform security reviews of templates, and enforce organizational policies that prohibit unauthenticated access to critical API functions. Combine these with automated checks in CI/CD to catch missing auth and unsafe bindings before deployment.

Find out what's already
exploitable in your codebase.