Critical

Amazon JDBC Driver for Redshift SQL Injection via line comment generation

  • Disclosed: 15.05.2024
  • Updated: 11.10.2026 13:20

Impact

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.

Patch

This issue is patched in driver version 2.1.0.28.

Workarounds

Do not use the connection property preferQueryMode=simple. (NOTE: If you do not explicitly specify a query mode, then you are using the default of extended query mode and are not affected by this issue.)

References

Similar to finding in Postgres JDBC: https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56

If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) com.amazon.redshift:redshift-jdbc42 < 2.1.0.28 2.1.0.28

References

CVSS score 10/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-89
Platform
Java / Kotlin (Maven)
Package
com.amazon.redshift:redshift-jdbc42
Disclosed
15.05.2024
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-x3wm-hffr-chwm - CC BY 4.0

Vulnerability history: com.amazon.redshift:redshift-jdbc42

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
10.2022 05.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 2

Disclosures per year

  1. 2022: 1
  2. 2023: 0
  3. 2024: 2
  4. 2025: 0
  5. 2026: 1
  1. High · 8.0 CVE-2024-12744 >= 2.1.0.31, < 2.1.0.32 2.1.0.32
  2. Amazon JDBC Driver for Redshift SQL Injection via line comment generation this entry
    Critical · 10.0 CVE-2024-32888 < 2.1.0.28 2.1.0.28

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.