Advisory

PYSEC-2026-3502

Details, part 2 of 2. The advisory

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/recipes
  • POST /v1/recipes/run
  • POST /v1/recipes/stream
  • POST /v1/recipes/validate
  • optional POST /admin/reload when 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:

  1. Remove or hard-disable the deprecated Typer praisonai recipe serve command, or make it delegate to the hardened RecipeHandler.cmd_serve() code path.
  2. Add the same non-localhost/no-auth guard to cli/commands/recipe.py.
  3. Treat PRAISONAI_API_KEY as a secret only when auth=api-key is selected; do not rely on the env var's presence alone unless the command also enables auth explicitly.
  4. Fix the deprecated command's help examples so remote binding always includes auth.
  5. Consider changing --cors default from * to no CORS or localhost origins.
  6. Add regression tests that invoke the installed praisonai.__main__.main() entrypoint, not only the legacy feature handler:
  • praisonai recipe serve --host 0.0.0.0 fails before launch unless auth is selected and configured;
  • praisonai recipe serve --host 0.0.0.0 --admin cannot expose /admin/reload without auth;
  • selected but misconfigured auth still returns 503;
  • configured auth with no header returns 401.

Sources & licences