Details
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.