CVE-2026-40112: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in MervinPraison PraisonAI
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.
AI Analysis
Technical Summary
PraisonAI is a multi-agent system whose Flask API endpoint in src/praisonai/api.py improperly neutralizes input during web page generation, leading to a cross-site scripting vulnerability (CWE-79). The sanitization function relies on the nh3 library, which is not included by default, causing the sanitizer to be effectively disabled and allowing injection of malicious JavaScript via manipulated agent inputs such as RAG data poisoning or prompt injection. This vulnerability affects all versions prior to 4.5.128 and is resolved in that version.
Potential Impact
An attacker able to influence agent input can inject arbitrary JavaScript that executes in the browsers of users viewing the API output. This can lead to client-side code execution with potential confidentiality and integrity impacts limited to the browser context. The CVSS score of 5.4 reflects a medium severity with low complexity and no privileges required, but requiring user interaction.
Mitigation Recommendations
This vulnerability is fixed in PraisonAI version 4.5.128. Users should upgrade to version 4.5.128 or later to remediate this issue. No official patch or temporary fix is indicated other than upgrading. Until the upgrade, ensure the nh3 library is installed to enable effective sanitization, or avoid exposing the vulnerable API endpoint to untrusted inputs.
CVE-2026-40112: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in MervinPraison PraisonAI
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PraisonAI is a multi-agent system whose Flask API endpoint in src/praisonai/api.py improperly neutralizes input during web page generation, leading to a cross-site scripting vulnerability (CWE-79). The sanitization function relies on the nh3 library, which is not included by default, causing the sanitizer to be effectively disabled and allowing injection of malicious JavaScript via manipulated agent inputs such as RAG data poisoning or prompt injection. This vulnerability affects all versions prior to 4.5.128 and is resolved in that version.
Potential Impact
An attacker able to influence agent input can inject arbitrary JavaScript that executes in the browsers of users viewing the API output. This can lead to client-side code execution with potential confidentiality and integrity impacts limited to the browser context. The CVSS score of 5.4 reflects a medium severity with low complexity and no privileges required, but requiring user interaction.
Mitigation Recommendations
This vulnerability is fixed in PraisonAI version 4.5.128. Users should upgrade to version 4.5.128 or later to remediate this issue. No official patch or temporary fix is indicated other than upgrading. Until the upgrade, ensure the nh3 library is installed to enable effective sanitization, or avoid exposing the vulnerable API endpoint to untrusted inputs.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T01:41:38.536Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d843751cc7ad14da3fb55f
Added to database: 4/10/2026, 12:25:25 AM
Last enriched: 4/17/2026, 11:45:07 AM
Last updated: 5/25/2026, 12:21:54 PM
Views: 76
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.