MediumVulnerability
CVE-2026-40112: PraisonAI Flask API stored cross-site scripting through unsanitized agent output
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-40112
- Published
- Record updated
- Affected
- PraisonAI < 4.5.128
- Fixed in
- 4.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
PraisonAI, a multi-agent teams system, prior to 4.5.128 renders agent output as HTML in the Flask API endpoint in src/praisonai/api.py without effective sanitization. The _sanitize_html function depends on the nh3 library, which pyproject.toml does not list as a required or optional dependency, so in the default installation it returns HTML unchanged. An attacker who can influence agent input, through RAG data poisoning, web scraping results or prompt injection, can inject JavaScript that runs in the browser of anyone viewing the API output.
Mitigation
Fixed in 4.5.128.
Related items
- HighCVE-2026-129995: mcp-ssh-manager shell command injection through backup tool argumentsSimilar attack · NVD/CVE Database
- MediumCVE-2026-77332: memtomem-stm envelope accepts Markdown and HTML from memory fieldsSimilar attack · NVD/CVE Database
- InfoMapping the AI threat landscape: MITRE ATLAS comes to Elastic SecuritySimilar attack · Elastic Security Labs
- HighCVE-2026-133631: FlowIntel note variable resolution exposes private case dataSimilar attack · NVD/CVE Database
- MediumCVE-2026-133505: Pydantic AI tool results become file downloads on history reloadSimilar attack · NVD/CVE Database