CVE-2024-9774:
python-sql SQL injection vulnerability
6.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.26047%
CWE
Published
12/27/2024
Updated
2/7/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
python-sql | pip | < 1.5.2 | 1.5.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unary operators (And/Or) not escaping non-Expression arguments. The bug report example shows And([Literal(True), 'foo']) produces unsafe SQL with raw 'foo' instead of a parameter. The commit f20551bbb8b3 explicitly addresses unary operator parameter handling. Since And and Or are core unary operators in sql.operators, their operand processing logic (likely in init or string serialization) is the root cause. The high confidence comes from direct evidence in the bug report, CVE description, and commit message linking to these operators.