Skip to content
MediumVulnerability

CVE-2026-40112: PraisonAI Flask API stored cross-site scripting through unsanitized agent output

Identifier
CVE-2026-40112
Published
Record updated
View JSON
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.