Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-40112: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in MervinPraison PraisonAI

0
Medium
VulnerabilityCVE-2026-40112cvecve-2026-40112cwe-79
Published: Thu Apr 09 2026 (04/09/2026, 21:16:13 UTC)
Source: CVE Database V5
Vendor/Project: MervinPraison
Product: 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

AILast updated: 04/17/2026, 11:45:07 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses