Intel

AIKIDO-2026-367021

pandas is vulnerable to SQL Injection

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 8, 2026
July 8, 2026

25

CVE Score

Low

SQL Injection

Are you affected? Scan for Free

TL;DR

The ADBCDatabase class in pandas/io/sql.py builds SQL statements by interpolating table and schema identifiers directly into query strings without quoting or escaping. When an application passes untrusted identifiers to read_sql_table, to_sql, or delete_rows over an ADBC connection, the read_table (SELECT), to_sql (DROP TABLE), and delete_rows (DELETE FROM) paths can execute attacker-controlled SQL instead of treating the value as a literal identifier. The SQLite path already quoted identifiers, but the ADBC path had no equivalent escaping when ADBC support was added. The fix adds a _quote_identifier helper that applies ANSI SQL double-quote escaping and quotes identifiers at all three call sites.

How do I fix this?

Upgrade the pandas library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and pass untrusted table or schema identifiers to pandas SQL functions that use an ADBC connection.

Package

Versions

2.2.0 - 3.0.3

Fixed in 3.0.4

Background info

pandas is vulnerable to SQL Injection in versions 2.2.0 - 3.0.3.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea