Intel

AIKIDO-2026-562088

langroid is vulnerable to SQL Injection

SQL InjectionGHSA-3gpx-vwr3-xvwx Published 3 days ago

81

High Risk

This Affects:

PYTHONlangroid
0.0.1 - 0.65.13
Fixed in 0.65.14
Are you affected? Scan for Free

TL;DR

SQLChatAgent enforces its SELECT-only statement allowlist by inspecting only the top-level parsed node of a query. Data-modifying CTEs such as WITH x AS (DELETE ...) SELECT ... and the SELECT ... INTO form parse with a top-level Select node, so they are accepted as read-only while the database still executes the embedded write. Under the default read-only policy, input that influences the generated SQL can insert, update, delete, or create data using an ordinary write-capable role. The fix walks the full parse tree for nested write nodes and rejects any statement whose parse tree contains a data-modifying operation outside the allowlist.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run SQLChatAgent against a write-capable database role with untrusted or prompt-influenced input shaping the generated SQL.

Background info

langroid is vulnerable to SQL Injection in versions 0.0.1 - 0.65.13.

How to fix this

Upgrade the langroid library to the patch version.