Skip to main content

Python CVE-2026-34939

HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-04-01 https://github.com/MervinPraison/PraisonAI GHSA-8w9j-hc3g-3g7f
7.5
CVSS 3.1 · NVD
View

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 /search_tools endpoint with a crafted regex query such as (a+)+$. The MCPToolIndex.search_tools() method compiles the pattern without validation and begins matching against tool names and hints. The regex engine enters catastrophic backtracking, consuming CPU and blocking the Python thread for 376 seconds. During this time, all other requests to the MCP server timeout or queue indefinitely, rendering the service unavailable. An attacker can repeat this request every few seconds to sustain indefinite denial of service. Publicly available proof-of-concept code (provided in the advisory) demonstrates the attack with exact timing and confirms the 376-second blocking behavior on version 1.5.87.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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 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

pypi praisonai fix: 4.5.90

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

NVD PRIMARY 7.5 HIGH
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

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

Lifecycle Timeline

4
Severity Changed
Jul 24, 2026 - 22:23 NVD
MEDIUM HIGH
CVSS changed
Jul 24, 2026 - 22:23 NVD
6.5 (MEDIUM) 7.5 (HIGH)
Patch released
Apr 02, 2026 - 14:30 nvd
Patch available
CVE Published
Apr 01, 2026 - 23:21 nvd
MEDIUM 6.5

DescriptionNVD

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)

python
# 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

python
# 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.0s

Impact

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

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)NVD

pkg:pip/praisonai

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

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