CriticalVulnerability
CVE-2026-40111: PraisonAIAgents command injection in memory hooks executor via shell=True
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-40111
- Published
- Record updated
- Affected
- praisonaiagents <= 1.5.126
- Fixed in
- 1.5.128
- released April 9, 2026, on the day of disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.2%
Summary
PraisonAIAgents, prior to 1.5.128, passes a user-controlled command string directly to subprocess.run() with shell=True in the memory hooks executor at src/praisonai-agents/praisonaiagents/memory/hooks.py, with no sanitization, so /bin/sh interprets shell metacharacters. Two attack surfaces exist: the pre_run_command and post_run_command hook event types, and the .praisonai/hooks.json lifecycle configuration, where BEFORE_TOOL and AFTER_TOOL hooks fire automatically. An agent that gains file-write access through prompt injection can overwrite hooks.json and run its payload silently at later lifecycle events.
Mitigation
Fixed in 1.5.128.
Related items
- MediumCVE-2026-134825: Gradio 6.27.0 before 6.32.0 contains an authentication bypass vulnerability in gradio/history.py that allows remote…Similar attack · NVD/CVE Database
- MediumCVE-2026-124248: GPTranslate WordPress plugin stored cross-site scripting via comment parameterSimilar attack · NVD/CVE Database
- MediumAmazon: China-Linked Hackers’ AI Agents Exploited Medical Software Zero-DaySimilar attack · SecurityWeek
- MediumAttackers' AI Agents Found a Zero-Day in Medical-Imaging Software and Gained Root AccessSimilar attack · The Hacker News
- MediumCVE-2026-54026: LibreChat message injection via conversationId in request bodySimilar attack · NVD/CVE Database