CVE-2026-25879: Langroid SQLChatAgent remote code execution via prompt injection

CVE-2026-25879 · Severity: critical · CVSS 9.8 · Published 2026-06-01

Langroid is a software framework used to build applications powered by large language models (LLMs). A vulnerability in its SQLChatAgent component allows attackers to execute unauthorized commands on the underlying database server by tricking the AI into generating malicious SQL code. This could lead to full system takeover, theft of sensitive data, or complete deletion of database contents.

Technologies: langroid (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-25879 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-25879 being exploited in the wild.
How severe is CVE-2026-25879?
Critical severity, with a CVSS score of 9.8, published 1 June 2026.
Which products and versions are affected?
langroid (PyPI) < 0.63.0, ECOSYSTEM:introduced=0,fixed=0.63.0.
Is there a fix for CVE-2026-25879?
Yes. langroid (PyPI): upgrade to 0.63.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-25879 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-25879?
Check whether you run langroid (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • langroid (PyPI): upgrade to 0.63.0 or later
    pip install "langroid>=0.63.0"

Technical details

The SQLChatAgent in Langroid versions prior to 0.63.0 executes SQL queries generated by an LLM without sufficient validation. By using prompt injection techniques, an attacker can influence the LLM to produce dialect-specific administrative commands (such as PostgreSQL's 'COPY FROM PROGRAM' or MSSQL's 'xp_cmdshell'). If the database connection is configured with high privileges, this results in remote code execution (RCE) on the database host. The vulnerability is triggered via network-reachable inputs that are processed by the agent's task loop. Version 0.63.0 mitigates this by implementing a SELECT-only allowlist and a dangerous-pattern blocklist using the sqlglot parser.

Affected products

  • Langroid Langroid < 0.63.0

Identifiers

  • CVE-2026-25879
  • GHSA-mxfr-6hcw-j9rq
  • PYSEC-2026-382

Timeline

  • 2026-05-27: advisory: GitHub Security Advisory published
  • 2026-06-01: disclosed: CVE published to NVD
  • 2026-06-01: patched: Fixed in version 0.63.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.