CVE-2026-40112 Details
Description
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the Flask API endpoint in src/praisonai/api.py renders agent output as HTML without effective sanitization. The _sanitize_html function relies on the nh3 library, which is not listed as a required or optional dependency in pyproject.toml. When nh3 is absent (the default installation), the sanitizer is a no-op that returns HTML unchanged. An attacker who can influence agent input (via RAG data poisoning, web scraping results, or prompt injection) can inject arbitrary JavaScript that executes in the browser of anyone viewing the API output. This vulnerability is fixed in 4.5.128.
A stored cross-site scripting vulnerability has been identified in PraisonAI versions prior to 4.5.128. The issue arises in the Flask API endpoint located in src/praisonai/api.py, where agent output is rendered as HTML without proper sanitization. The vulnerability exists because the _sanitize_html function depends on the nh3 library, which is not listed as a required or optional dependency in pyproject.toml. In default installations, where nh3 is absent, the sanitizer fails to operate effectively, allowing an attacker to inject arbitrary JavaScript that executes in the browser of anyone viewing the API output. This exploitation can occur through RAG data poisoning, web scraping results, or prompt injection.
Users should update to PraisonAI version 4.5.128 or later, and ensure that the nh3 library is installed. Additionally, the dependency management in pyproject.toml should be updated to include nh3 as a required dependency.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfg2-mxfj-j6pw | CISA-ADP | ExploitVendor Advisory |
| https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfg2-mxfj-j6pw | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| praison praisonai | < 4.5.128 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 17, 2026 | Initial Analysis | [email protected] |
| Apr 14, 2026 | CVE Modified | CISA-ADP |
| Apr 9, 2026 | New CVE Received | [email protected] |