CVE-2024-32888
Amazon JDBC Driver for Redshift SQL Injection via line comment generation
Check your servers for CVE-2024-32888
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-32888 affects amazon-redshift-jdbc-driver, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.)
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.78%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 57.0% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 15 May 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| amazon-redshift-jdbc-driver |
affected < 2.1.0.28
|
Is my server affected?
Find the installed version of amazon-redshift-jdbc-driver and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i amazon-redshift-jdbc-driver
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-32888 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-32888RHEL, Rocky, Alma, Fedora
rpm -q amazon-redshift-jdbc-driver
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-32888Alpine
apk list --installed | grep -i amazon-redshift-jdbc-driverWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-32888
trivy image --scanners vuln IMAGE | grep CVE-2024-32888
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/aws/amazon-redshift-jdbc-driver/security/advisories/GHSA-x3wm-hffr-chwm github.com
Other references
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56 github.com
- https://github.com/aws/amazon-redshift-jdbc-driver/commit/0d354a5f26ca23f7cac4e800e3b8734220230319 github.com
- https://github.com/aws/amazon-redshift-jdbc-driver/commit/12a5e8ecfbb44c8154fc66041cca2e20ecd7b339 github.com
- https://github.com/aws/amazon-redshift-jdbc-driver/commit/bc93694201a291493778ce5369a72befeca5ba7d github.com
- https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/ sonarsource.com
Source: the record CVE-2024-32888 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse