pandas is vulnerable to SQL Injection
25
CVE Score
Low
SQL Injection
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.
Upgrade the pandas library to the patch version.
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.
2.2.0 - 3.0.3
Fixed in 3.0.4pandas is vulnerable to SQL Injection in versions 2.2.0 - 3.0.3.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.