CVE-2026-57137
nicheTool-approval bypass in PraisonAI agent loop executes rejected tools
PraisonAI, an open-source multi-agent framework, contains a broken authorization/protection-mechanism flaw in the TypeScript agent loop: createAgentLoop() in praisonai-ts passes executable tool handlers to generateText() before consulting the onToolCall approval callback, and the underlying AI SDK runs tool handlers during generation. As a result, even when the operator's onToolCall callback returns false to deny a tool, the denied tool has already executed and its results are populated into toolResults, with 'tool_rejected' recorded only after the fact. An attacker who can influence the model's behavior (for example via prompt injection) or a low-privileged user of an affected application can cause file, shell-command, API, or data-modifying operations that the approval boundary was supposed to block, with high impact to confidentiality, integrity, and availability. Applications built on praisonai-ts versions 1.4.0 through before 1.7.2 that rely on onToolCall as a human or policy approval gate are affected. There is no public PoC, the flaw is not in CISA's KEV catalog, and no exploitation has been observed; the issue is fixed in version 1.7.2.
What to do: Upgrade praisonai-ts to version 1.7.2 or later, where the approval callback is enforced before tool execution. Until patched, do not treat onToolCall as a security boundary: run agents with least-privilege credentials, sandbox or stub file-system, shell, and API tools, and gate destructive tools outside the generation loop. Audit logs and toolResults for any 'tool_rejected' entries whose side effects may already have occurred and remediate accordingly.
| praisonai-ts (PraisonAI TypeScript agent loop) | >= 1.4.0, < 1.7.2 (fixed in 1.7.2) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
PraisonAI is a multi-agent teams system. From 1.4.0 until 1.7.2, createAgentLoop() in src/praisonai-ts/src/ai/agent-loop.ts passes executable tools to generateText() before invoking the onToolCall approval callback. Because the wrapped AI SDK executes tool handlers during generation, a callback that returns false records tool_rejected only after the denied tool has already produced side effects and populated toolResults. Applications using onToolCall as a human or policy approval boundary can therefore execute rejected file, command, API, or data-modifying operations. This issue is fixed in version 1.7.2.
- Weakness
- CWE-693, CWE-862, CWE-863
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.