Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
CVE-2024-1597
Summary
The pgjdbc, the PostgreSQL JDBC Driver, allows an attacker to inject SQL if using "PreferQueryMode=SIMPLE". Note this is not the default. In the default mode, there is no vulnerability. A placeholder for a numeric value must be immediately preceded by a minus. There must be a second placeholder for a string value after the first placeholder; both must be on the same line. By constructing a matching string payload, the attacker can inject SQL to alter the query, bypassing the protections that parameterized queries bring against SQL Injection attacks. This issue affects org.postgresql:postgresql versions prior to 42.2.28-rc1, 42.3.x prior to 42.3.9-rc1, 42.4.x prior to 42.4.4-rc1, 42.5.x prior to 42.5.5-rc1, 42.6.x prior to 42.6.1-rc1, 42.7.x prior to 42.7.2-rc1.
- LOW
- NETWORK
- HIGH
- UNCHANGED
- NONE
- NONE
- HIGH
- HIGH
CWE-89 - SQL Injection
Structured Query Language (SQL) injection attacks are one of the most common types of vulnerabilities. They exploit weaknesses in vulnerable applications to gain unauthorized access to backend databases. This often occurs when an attacker enters unexpected SQL syntax in an input field. The resulting SQL statement behaves in the background in an unintended manner, which allows the possibility of unauthorized data retrieval, data modification, execution of database administration operations, and execution of commands on the operating system.
References
Advisory Timeline
- Published