Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 57%

Langroid has Prompt to SQL Injection, Leading to RCE (CVE-2026-25879)

0
Critical
Published: 05/27/2026 (05/27/2026, 19:38:58 UTC)
Source: GCVE Database
Product: langroid

Description

Langroid versions prior to 0.63.0 contain a vulnerability in the SQLChatAgent component where SQL queries generated by a large language model (LLM) are executed without sufficient validation. This allows an attacker who can influence the LLM's input to inject SQL commands that leverage database-specific features (e.g., PostgreSQL's COPY FROM PROGRAM) to execute arbitrary system commands, resulting in remote code execution (RCE) on the database host. The vulnerability arises when the database role has elevated privileges that permit such operations. The issue is fixed in version 0.63.0 by restricting SQLChatAgent to a safe subset of SQL commands and blocking dangerous patterns by default. The vulnerability is critical due to its potential for full system compromise via the database server.

CVSS v3.1

Score 9.8critical

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

Affected software

PyPIghsa
langroid
Affected versions
<0.63.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/02/2026, 23:35:28 UTC

Technical Analysis

The vulnerability in Langroid <0.63.0 involves the SQLChatAgent executing SQL statements generated by an LLM without adequate filtering or validation. Attackers can exploit prompt injection to craft SQL commands that invoke dialect-specific primitives capable of executing arbitrary code on the database host, such as PostgreSQL's COPY FROM PROGRAM. This leads to remote code execution when the database user has privileges allowing such operations. The vulnerability is mitigated in version 0.63.0 by implementing a whitelist of allowed SQL operations (e.g., SELECT-only) and blocking dangerous commands by default. The previous unrestricted behavior can be restored only in trusted environments by explicitly enabling allow_dangerous_operations. The vulnerability is tracked as CVE-2026-25879 and is rated critical with a CVSS 3.1 vector indicating network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability.

Potential Impact

Successful exploitation allows attackers to execute arbitrary system commands on the database server, potentially leading to full remote code execution. This can result in exfiltration of sensitive data, unauthorized modification or deletion of database contents, and further compromise of the underlying infrastructure. The impact is critical as it affects confidentiality, integrity, and availability of the system.

Mitigation Recommendations

A fix is available in Langroid version 0.63.0, which defaults SQLChatAgent to a SELECT-only SQL statement allowlist with a dialect-aware blocklist for dangerous patterns. Users should upgrade to version 0.63.0 or later. For deployments requiring unrestricted SQL operations, the allow_dangerous_operations flag must be explicitly enabled only in trusted environments. Until upgraded, users should restrict database roles to minimize privileges that allow execution of system commands and avoid exposing the SQLChatAgent to untrusted input.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-mxfr-6hcw-j9rq
Osv Schema Version
1.4.0
Aliases
["CVE-2026-25879"]
Ecosystems
["PyPI"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a46ed1527e9c7971944709f

Added to database: 07/02/2026, 22:58:29 UTC

Last enriched: 07/02/2026, 23:35:28 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 58

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses