{"id":"CVE-2024-32888","published":"2024-05-15T02:16:47Z","modified":"2025-06-12T15:33:10Z","title":"Amazon JDBC Driver for Redshift SQL Injection via line comment generation","vendor":"aws","product":"amazon-redshift-jdbc-driver","tier":"tail","description":{"text":"The Amazon JDBC Driver for Redshift is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in the Java Platform, Enterprise Editions. Prior to version 2.1.0.28, SQL injection is possible when using the non-default connection property `preferQueryMode=simple` in combination with application code which has a vulnerable SQL that negates a parameter value. There is no vulnerability in the driver when using the default, extended query mode. Note that `preferQueryMode` is not a supported parameter in Redshift JDBC driver, and is inherited code from Postgres JDBC driver. Users who do not override default settings to utilize this unsupported query mode are not affected. This issue is patched in driver version 2.1.0.28. As a workaround, do not use the connection property `preferQueryMode=simple`. (NOTE: Those who do not explicitly specify a query mode use the default of extended query mode and are not affected by this issue.)","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01353,"percentile":0.71697,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/aws/amazon-redshift-jdbc-driver/security/advisories/GHSA-x3wm-hffr-chwm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56","tags":["x_refsource_MISC"]},{"url":"https://github.com/aws/amazon-redshift-jdbc-driver/commit/0d354a5f26ca23f7cac4e800e3b8734220230319","tags":["x_refsource_MISC"]},{"url":"https://github.com/aws/amazon-redshift-jdbc-driver/commit/12a5e8ecfbb44c8154fc66041cca2e20ecd7b339","tags":["x_refsource_MISC"]},{"url":"https://github.com/aws/amazon-redshift-jdbc-driver/commit/bc93694201a291493778ce5369a72befeca5ba7d","tags":["x_refsource_MISC"]},{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/","tags":[]}],"priority":{"score":21.3,"factors":[{"name":"EPSS percentile","points":14.34},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"aws","affectedVersions":[{"vendor":"aws","product":"amazon-redshift-jdbc-driver","versions":["< 2.1.0.28"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2024-05-15T15:04:35.778093Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"com.amazon.redshift:redshift-jdbc42","vulnerableRanges":["<2.1.0.28"],"patched":["2.1.0.28"],"from":["GHSA-x3wm-hffr-chwm"],"provenance":"source"}],"summary":{"text":"The Amazon JDBC Driver for Redshift (amazon-redshift-jdbc-driver) contains an SQL injection flaw, present in versions before 2.1.0.28, that is triggered when the unsupported connection property preferQueryMode=simple is set and the application builds SQL that negates a parameter value. An attacker can inject SQL through that parameter over the network without authentication or user interaction, provided the application uses the simple query mode together with such vulnerable SQL, while the default extended query mode is not affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:22Z"},"euvd":{"id":"EUVD-2024-1847","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pgjdbc-cve-2024-1597","parents":[{"from":"CVE-2024-1597","to":"CVE-2024-32888","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-24rp-q3w6-vc56","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-x3wm-hffr-chwm","via":"reference","url":"https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56"}]}],"packageHistory":[{"cve":"CVE-2022-41828","published":"2022-09-29","fixed":"2.1.0.8","kev":false,"link":{"from":"CVE-2022-41828","to":"CVE-2024-32888","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:com.amazon.redshift:redshift-jdbc42","fromFixed":"2.1.0.8","toFixed":"2.1.0.28","daysApart":594}]}},{"cve":"CVE-2024-32888","published":"2024-05-15","fixed":"2.1.0.28","kev":false},{"cve":"CVE-2024-12744","published":"2024-12-24","fixed":"2.1.0.32","kev":false},{"cve":"CVE-2026-8178","published":"2026-05-08","fixed":"2.2.2","kev":false}],"package":"Maven:com.amazon.redshift:redshift-jdbc42"}}