GHSA-5qw8-f2g9-ff29 CVE-2026-56836 PYSEC-2026-3502
PraisonAI recipe serve Typer command bypasses the non-localhost authentication guard
- Severity
- 8.2 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.33%
- Chance of exploitation in the next 30 days. Higher than 26.12% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-287 Improper Authentication
- CWE-306 Missing Authentication for Critical Function
- CWE-862 Missing Authorization
- Fix
4.6.59- Upgrade praisonai to this version or later
Description
PraisonAI recipe serve Typer command bypasses the non-localhost authentication guard
Summary
PraisonAI's installed console entrypoint is Typer-first. In current releases,
the recipe command is registered in the Typer app and
praisonai recipe serve dispatches to the deprecated Typer command in
src/praisonai/praisonai/cli/commands/recipe.py.
That Typer command can start the Recipe HTTP server on a non-localhost interface with no authentication:
praisonai recipe serve --host 0.0.0.0 --admin
It prints a deprecation warning, then launches the server with:
{
"host": "0.0.0.0",
"config": {
"cors_origins": "*",
"enable_admin": true
}
}
Because config.auth is absent, create_app() does not attach the API-key or
JWT middleware. Unauthenticated requests can then reach the recipe API and, when
enabled, /admin/reload.
This is an incomplete hardening / sibling-callsite issue. The legacy feature
handler in src/praisonai/praisonai/cli/features/recipe.py rejects the same
non-localhost/no-auth combination, and current create_auth_middleware() now
fails closed if API-key/JWT auth is selected without a secret. The installed
Typer command bypasses both expectations by never requiring or setting auth.
Affected product
- Repository:
MervinPraison/PraisonAI - Package:
praisonai - Component:
src/praisonai/praisonai/__main__.pysrc/praisonai/praisonai/cli/app.pysrc/praisonai/praisonai/cli/commands/recipe.pysrc/praisonai/praisonai/cli/features/recipe.pysrc/praisonai/praisonai/recipe/serve.py
Confirmed affected:
v4.6.58 1ad58ca02975ff1398efeda694ea2ab78f20cf3e
v4.6.57 e90d92231853161ad931f3498da57651a9f8b528
v4.6.56 d3c4a2afadfbf3a3e172e460e607ba4efad263a6
v4.6.34 e5928449f73f66cc8af1de61621aa974ab255133
v4.6.33 dfbb8d78ec7e8dc7118bc722ab1b2524bc98ddab
v4.6.10 4b1b17b963cbd0625e41394a30168c95b26429b2
v4.5.128 b4e3a8a84ade44ac3dd9102b792cdb4311a95937
v4.5.112 bfe3d94bad6db92fc2927c2e3c081ae8303e209e
Suggested affected range: praisonai >= 4.5.112, <= 4.6.58.
The lower bound is conservative and based on sampled tags. Maintainers should confirm the exact introduction point before publishing a final range.
Root cause
The installed entrypoint routes registered Typer commands before falling back to the legacy dispatcher:
if first_cmd in _get_typer_commands():
_run_typer(argv)
else:
_run_legacy(argv)
cli/app.py registers commands.recipe as the recipe Typer command:
from .commands.recipe import app as recipe_app
...
app.add_typer(recipe_app, name="recipe", help="Recipe management")
The deprecated Typer recipe serve implementation accepts a remote host,
defaults CORS to *, and only enables authentication when --api-key is
explicitly provided:
host: str = typer.Option("127.0.0.1", "--host", "-h", ...)
api_key: str = typer.Option(None, "--api-key", ...)
cors: str = typer.Option("*", "--cors", ...)
admin: bool = typer.Option(False, "--admin", ...)
...
serve_config = {}
...
if api_key:
serve_config["api_key"] = api_key
serve_config["auth"] = "api-key"
if cors:
serve_config["cors_origins"] = cors
if admin:
serve_config["enable_admin"] = True
...
serve(host=host, port=port, reload=reload, config=serve_config, workers=workers)
There is no equivalent to the hardened non-localhost guard in the legacy feature handler:
if host != "127.0.0.1" and host != "localhost" and auth == "none":
self._print_error("Auth required for non-localhost binding. Use --auth api-key or --auth jwt")
return self.EXIT_POLICY_DENIED
The Recipe server only installs auth middleware when config["auth"] is set:
auth_type = config.get("auth")
if auth_type and auth_type != "none":
auth_middleware = create_auth_middleware(...)
if auth_middleware:
middleware.append(Middleware(auth_middleware))
On current v4.6.58, the selected-auth paths fail closed correctly:
auth=api-keywith no key returns503.auth=api-keywith a key but no request header returns401.
The vulnerable Typer path does not select auth at all.
Local-only PoV
Run from the harness checkout:
uv run \
--with starlette --with httpx --with typer --with rich --with pyyaml \
--with sse-starlette --with click --with python-dotenv \
python submission-bundle/praisonai-prai-cand-016-recipe-serve-typer-auth-bypass/poc/pov_prai_cand_016_recipe_serve_typer_auth_bypass.py \
--repo artifacts/repos/praisonai-v4.6.58 \
--label v4.6.58
The PoV does not bind a socket. It monkey-patches the recipe server launcher,
invokes the real praisonai.__main__.main() entrypoint with
recipe serve --host 0.0.0.0 --admin, captures the launch config, and then
uses Starlette's in-process test client to exercise the resulting app.
Observed v4.6.58 result:
{
"candidate": "PRAI-CAND-016",
"entrypoint_exit_code": 0,
"typer_recipe_command_registered": true,
"captured_launch": {
"host": "0.0.0.0",
"port": 8765,
"config": {
"cors_origins": "*",
"enable_admin": true
}
},
"bypass": {
"admin_reload": {
"path": "/admin/reload",
"status": 200
},
"openapi": {
"path": "/openapi.json",
"status": 200
}
},
"controls": {
"auth_api_key_no_secret": {
"admin_reload": {
"status": 503
}
},
"auth_api_key_no_header": {
"admin_reload": {
"status": 401
}
}
},
"feature_handler_nonlocalhost_noauth_exit": 4,
"auth_fail_closed_current_control": true,
"ok": true
}
Stored evidence:
evidence/current-v4.6.58.jsonevidence/version-sweep.tsv
Why this is not intended behavior
This is not only a disagreement about whether operators should configure auth.
PraisonAI's current security documentation says recent hardening changed API
servers so anonymous requests return 401 and servers bind to 127.0.0.1 by
default. Recipe server docs say auth: api-key should be used for production,
admin endpoints require auth, and public servers should not run without
authentication.
The implementation also shows the intended boundary:
create_auth_middleware()now returns503if API-key/JWT auth is selected without a secret.RecipeHandler.cmd_serve()refuses non-localhost binding whenauthisnone.- The vulnerable Typer command is marked deprecated and tells users to use the
newer command, but the installed entrypoint still routes
praisonai recipeto that Typer command before the legacy handler can enforce the guard.
The official local HTTP sidecar docs describe the sidecar as communicating over localhost and "no external network required", but the Docker example still uses:
CMD ["praisonai", "recipe", "serve", "--host", "0.0.0.0", "--port", "8765"]
That command exposes the Typer path above and does not enable auth, even if
PRAISONAI_API_KEY is present in the environment, because this path only sets
auth when --api-key is passed or a config file sets auth.
Impact
If an operator follows the vulnerable command path on a reachable interface, any network caller that can reach the Recipe HTTP server can access recipe runner endpoints without credentials.
Affected endpoints include:
GET /v1/recipesPOST /v1/recipes/runPOST /v1/recipes/streamPOST /v1/recipes/validate- optional
POST /admin/reloadwhen admin endpoints are enabled
The exact impact depends on configured recipes and deployment context. At a minimum, an attacker can enumerate recipes and trigger recipe validation or execution flows intended for local or authenticated callers. In deployments with powerful recipes, tool-enabled recipes, or admin endpoints, this can cause unauthorized workflow execution, model/API spend, state changes, or recipe registry reload operations.
This report does not claim arbitrary code execution by default.
Suggested fix
Prefer one canonical Recipe server CLI path and enforce the same preflight for every wrapper.
Recommended changes:
- Remove or hard-disable the deprecated Typer
praisonai recipe servecommand, or make it delegate to the hardenedRecipeHandler.cmd_serve()code path. - Add the same non-localhost/no-auth guard to
cli/commands/recipe.py. - Treat
PRAISONAI_API_KEYas a secret only whenauth=api-keyis selected; do not rely on the env var's presence alone unless the command also enables auth explicitly. - Fix the deprecated command's help examples so remote binding always includes auth.
- Consider changing
--corsdefault from*to no CORS or localhost origins. - Add regression tests that invoke the installed
praisonai.__main__.main()entrypoint, not only the legacy feature handler:praisonai recipe serve --host 0.0.0.0fails before launch unless auth is selected and configured;praisonai recipe serve --host 0.0.0.0 --admincannot expose/admin/reloadwithout auth;- selected but misconfigured auth still returns
503; - configured auth with no header returns
401.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| praisonai | >= 4.5.112, < 4.6.59 |
4.6.59 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
praisonai PyPI → 4.6.59
- pip
pip install --upgrade "praisonai>=4.6.59"- poetry
poetry add "praisonai>=4.6.59"- uv
uv add "praisonai>=4.6.59"
Severity breakdown
CVSS 3.1 8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- High
- Availability
- None
Weakness
CWE-287: Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
How to prevent it
- Architecture and Design: Use an authentication framework or library such as the OWASP ESAPI Authentication feature.
CWE-306: Missing Authentication for Critical Function
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
How to prevent it
- Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Identify which of these areas require a proven user identity, and use a centralized authentication capability. Identify all potential communication channels, or other means of interaction with the software, to ensure that all channels are appropriately protected, including those channels that are assumed to be accessible only by authorized parties. Developers sometimes perform authentication at the primary channel, but open up a secondary channel that is assumed to be private. For example, a login mechanism may be listening on one network port, but after successful authentication, it may open up a second port where it waits for the connection, but avoids authentication because it assumes that only the authenticated party will connect to the port. In general, if the software or protocol allows a single session or user state to persist across multiple connections or channels, authentication and appropriate credential management need to be used throughout.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Architecture and Design: Where possible, avoid implementing custom, "grow-your-own" authentication routines and consider using authentication capabilities as provided by the surrounding framework, operating system, or environment. These capabilities may avoid common weaknesses that are unique to authentication; support automatic auditing and tracking; and make it easier to provide a clear separation between authentication tasks and authorization tasks. In environments such as the World Wide Web, the line between authentication and authorization is sometimes blurred. If custom authentication routines are required instead of those provided by the server, then these routines must be applied to every single page, since these pages could be requested directly.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator [REF-45].
- Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to require strong authentication for users who should be allowed to access the data [REF-1297] [REF-1298] [REF-1302].
CWE-862: Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-26mh-57q7-jfvr PraisonAI vulnerable to Remote Code Execution via Broken AST Sandbox | High | Also affects praisonai |
| GHSA-6g6r-q6gw-w8fg PraisonAI has a Browser Server WebSocket origin validation bypass via unanchored regex (patch bypass of CVE-2026-40289 / GHSA-8x8f-54wf-vv92) | Critical | Also affects praisonai |
| GHSA-pvph-5j39-v8qc PraisonAI: Origin-validation bypass (startswith prefix match) enables unauthenticated cross-site request forgery against the PraisonAI MCP HTTP server | High | Also affects praisonai |
| GHSA-gfq8-hmph-9gjv PraisonAI: Authentication fail-open in Recipe server allows unauthenticated access when API key or JWT auth is configured without a secret | High | Also affects praisonai |
| GHSA-2jgc-f764-c5r2 PraisonAI: [Auth Bypass] PraisonAI async Jobs API (`/api/v1/runs`) has no authentication — unauthenticated job execution, result theft, cancel and delete | High | Also affects praisonai |
| GHSA-pvxx-r596-f5qj PraisonAI: `--api-key` flag on `praisonai serve` is not properly enforced | High | Also affects praisonai |
| GHSA-hmfx-4v44-9qw9 PraisonAI vulnerable to Server-Side Request Forgery via DNS rebinding bypass in webhook_url validation | Medium | Also affects praisonai |
| GHSA-rg5q-pp8p-f7jm PraisonAI: Webhook SSRF via DNS fail-open in `JobSubmitRequest.validate_webhook_url()` — bypass of CVE-2026-40114 | High | Also affects praisonai |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor