# CVE-2026-25879: Langroid has Prompt to SQL Injection, Leading to RCE

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-27T19:38:58.000Z
- Modified: 2026-07-21T19:10:00.107Z
- Also known as: GHSA-mxfr-6hcw-j9rq, PYSEC-2026-382
- Weaknesses: CWE-89, CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

Langroid is a framework for building large-language-model-powered applications. Prior to version 0.63.0, SQLChatAgent executes SQL produced by an LLM, which is influenceable by prompt injection. When configured with a database role that has privileges enabling code execution or filesystem access (e.g., PostgreSQL pg_execute_server_program, MySQL FILE, MSSQL xp_cmdshell), an attacker who can shape the agent's input — including indirectly via data returned to the LLM — can coerce execution of dialect-specific primitives such as `COPY ... FROM PROGRAM`, achieving RCE on the database host. Fixed in v0.63.0 by defaulting SQLChatAgent to a SELECT-only sqlglot-parsed statement allowlist with a dialect-aware dangerous-pattern blocklist; allow_dangerous_operations=True restores the previous unrestricted behavior for trusted deployments.

(As written by CVE List.)

## Affected

- langroid langroid: < 0.63.0
- langroid (PyPI): before 0.63.0

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/langroid/langroid/security/advisories/GHSA-mxfr-6hcw-j9rq> (exploit, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25879> (advisory)
- <https://github.com/langroid/langroid> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/langroid/PYSEC-2026-382.yaml> (web)
- <https://pypi.org/project/langroid> (package, web)
- <https://github.com/advisories/GHSA-mxfr-6hcw-j9rq> (advisory)

## Sources

- CVE List: [CVE-2026-25879](https://www.cve.org/CVERecord?id=CVE-2026-25879), CVE Terms of Use, modified 2026-06-02
- GitHub Advisory Database: [GHSA-mxfr-6hcw-j9rq](https://github.com/advisories/GHSA-mxfr-6hcw-j9rq), CC-BY-4.0, modified 2026-07-01
- NVD: [CVE-2026-25879](https://nvd.nist.gov/vuln/detail/CVE-2026-25879), Public domain, modified 2026-07-21
- PyPA Advisory Database: [PYSEC-2026-382](https://osv.dev/vulnerability/PYSEC-2026-382), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2026-25879 · Whole record: https://cve.day/CVE-2026-25879.json · Rebuilt by cve.day 2026-11-25T22:59:23.540Z
