CVSS 3.1
9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCritical (9.8). EPSS 4.8% estimated probability of exploitation activity in the next 30 days. Fixed in org.postgresql:postgresql 42.2.28, 42.3.9, 42.4.4.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Horg.postgresql:postgresql (Maven): fixed in 42.2.28, 42.3.9, 42.4.4, 42.5.5, 42.6.1, 42.7.2Explain CVE-2024-1597 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-1597?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-1597?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-1597 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| postgresql:postgresql_jdbc_driver | before 42.2.28 |
| postgresql:postgresql_jdbc_driver | from 42.3.0 before 42.3.9 |
| postgresql:postgresql_jdbc_driver | from 42.4.0 before 42.4.4 |
| postgresql:postgresql_jdbc_driver | from 42.5.0 before 42.5.5 |
| postgresql:postgresql_jdbc_driver | from 42.6.0 before 42.6.1 |
| postgresql:postgresql_jdbc_driver | from 42.7.0 before 42.7.2 |
| fedoraproject:fedora | 40 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | <42.2.28 | 42.2.28 |
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | >=42.3.0 <42.3.9 | 42.3.9 |
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | >=42.4.0 <42.4.4 | 42.4.4 |
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | >=42.5.0 <42.5.5 | 42.5.5 |
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | >=42.6.0 <42.6.1 | 42.6.1 |
| GHSA-24rp-q3w6-vc56 | Maven | org.postgresql:postgresql | >=42.7.0 <42.7.2 | 42.7.2 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 10 | libpgjava | 42.2.5-2+deb10u4 | DLA-3812-1 |
| Debian | 11 | libpgjava | 42.2.15-1+deb11u2 | DLA-3995-1 |
| Debian | 12 | libpgjava | 42.5.5-0+deb12u1 | DEBIAN-CVE-2024-1597 |
| Debian | 13, 14 | libpgjava | 42.7.2-1 | DEBIAN-CVE-2024-1597 |
| Ubuntu | 14.04:LTS, 22.04:LTS, Pro:18.04:LTS and 1 more | libpgjava | no fix listed | UBUNTU-CVE-2024-1597 |
| Red Hat | enterprise_linux:8::appstream | postgresql-jdbc, postgresql-jdbc-javadoc | 0:42.2.14-3.el8_9 | RHSA-2024:1435 |
| Red Hat | enterprise_linux:9::appstream | postgresql-jdbc | 0:42.2.28-1.el9_3 | RHSA-2024:1436 |
| Red Hat | rhel_aus:8.2::appstream, rhel_e4s:8.2::appstream, rhel_tus:8.2::appstream | postgresql-jdbc, postgresql-jdbc-javadoc | 0:42.2.3-5.el8_2 | RHSA-2024:2624 |
| Red Hat | rhel_aus:8.4::appstream, rhel_e4s:8.4::appstream, rhel_tus:8.4::appstream | postgresql-jdbc, postgresql-jdbc-javadoc | 0:42.2.3-7.el8_4 | RHSA-2024:4375 |
| Red Hat | rhel_aus:8.6::appstream, rhel_e4s:8.6::appstream, rhel_tus:8.6::appstream | postgresql-jdbc, postgresql-jdbc-javadoc | 0:42.2.3-5.el8_6 | RHSA-2024:4402 |
| Red Hat | rhel_eus:8.8::appstream | postgresql-jdbc, postgresql-jdbc-javadoc | 0:42.2.14-5.el8_8 | RHSA-2024:3313 |
| Red Hat | rhel_eus:9.0::appstream | postgresql-jdbc | 0:42.2.28-1.el9_0 | RHSA-2024:1999 |
| Red Hat | rhel_eus:9.2::appstream | postgresql-jdbc | 0:42.2.28-1.el9_2 | RHSA-2024:1649 |
| SUSE | Enterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 more | postgresql-jdbc | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
| SUSE | Linux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Server Applications 15 SP5 and 4 more | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE | Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 | postgresql-jdbc | 9.4-3.12.1 | SUSE-SU-2024:0771-1 |
| openSUSE | Leap 15.5 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| AlmaLinux | 8 | postgresql-jdbc, postgresql-jdbc-javadoc | 42.2.14-3.el8_9 | ALSA-2024:1435 |
| AlmaLinux | 9 | postgresql-jdbc | 42.2.28-1.el9_3 | ALSA-2024:1436 |
| Rocky Linux | 8 | postgresql-jdbc | 0:42.2.14-3.el8_9 | RLSA-2024:1435 |
| Rocky Linux | 9 | postgresql-jdbc | 0:42.2.28-1.el9_3 | RLSA-2024:1436 |
| Alpine | v3.19, v3.20, v3.21 and 3 more | java-postgresql-jdbc | 42.6.2-r0 | ALPINE-CVE-2024-1597 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.
Red Hat rates this Important.
The PostgreSQL JDBC Driver is not affected in the default query mode. Users that do not override the query mode are not impacted.
The described SQL injection vulnerability, while significant, is categorized as important rather than critical due to several factors. Firstly, the exploitation relies on specific conditions, including the use of a non-default query mode (preferQueryMode=simple) and the precise arrangement of user-controlled parameters within the SQL query. This limits the potential attack surface and reduces the likelihood of widespread exploitation across systems. Additionally, the vulnerability does not pose an immediate and severe risk of system compromise or data breach; rather, it enables attackers to manipulate SQL queries and potentially execute arbitrary commands within the context of the application's database. Furthermore, the vulnerability can be effectively mitigated by applying the provided patch or by avoiding the use of the vulnerable query mode, thus reducing the risk of exploitation.
Red Hat Satellite ships a PostgreSQL JDBC Driver which embeds into Candlepin. However, Candlepin doesn't directly utilize the PostgreSQL JDBC Driver and doesn't set PreferQueryMode. Therefore, although the affected component is shipped, the product impact is considered Low. This issue may be addressed in a future Satellite release.
Do not use the connection propertypreferQueryMode=simple. If you do not explicitly specify a query mode, then you are using the default of extended and are not impacted by this issue.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat build of Apache Camel 4.4.1 for Spring Boot 3.2 | pgjdbc | Fixed 2024-07-25 | RHSA-2024:4884 |
| Red Hat build of Keycloak 24 | pgjdbc | Fixed 2024-04-29 | RHBA-2024:2108 |
| Red Hat build of Quarkus 2.13.9.SP2 | org.postgresql/postgresql:42.5.6.redhat-00001 | Fixed 2024-04-22 | RHSA-2024:1797 |
| Red Hat build of Quarkus 3.2.11.Final | org.postgresql/postgresql:42.6.1.redhat-00001 | Fixed 2024-04-03 | RHSA-2024:1662 |
| Red Hat Enterprise Linux 8 | postgresql-jdbc-0:42.2.14-3.el8_9 | Fixed 2024-03-20 | RHSA-2024:1435 |
| Red Hat Enterprise Linux 8.2 Advanced Update Support | postgresql-jdbc-0:42.2.3-5.el8_2 | Fixed 2024-04-30 | RHSA-2024:2624 |
| Red Hat Enterprise Linux 8.2 Telecommunications Update Service | postgresql-jdbc-0:42.2.3-5.el8_2 | Fixed 2024-04-30 | RHSA-2024:2624 |
| Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions | postgresql-jdbc-0:42.2.3-5.el8_2 | Fixed 2024-04-30 | RHSA-2024:2624 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | postgresql-jdbc-0:42.2.3-7.el8_4 | Fixed 2024-07-08 | RHSA-2024:4375 |
| Red Hat Enterprise Linux 8.4 Telecommunications Update Service | postgresql-jdbc-0:42.2.3-7.el8_4 | Fixed 2024-07-08 | RHSA-2024:4375 |
| Red Hat build of Apache Camel 4 for Quarkus 3 | pgjdbc | Will not fix | |
| Red Hat build of Apache Camel for Spring Boot 3 | pgjdbc | Affected | |
| Red Hat build of Apicurio Registry 2 | pgjdbc | Not affected | |
| Red Hat build of OptaPlanner 8 | pgjdbc | Will not fix | |
| Red Hat Enterprise Linux 6 | postgresql-jdbc | Not affected | |
| Red Hat Enterprise Linux 7 | postgresql-jdbc | Not affected | |
| Red Hat Enterprise Linux 8 | libreoffice:flatpak/postgresql-jdbc | Will not fix | |
| Red Hat Enterprise Linux 9 | libreoffice:flatpak/postgresql-jdbc | Will not fix | |
| Red Hat Fuse 7 | pgjdbc | Not affected | |
| Red Hat Integration Camel Quarkus 2 | pgjdbc | Will not fix | |
| 24 more in the JSON and on Red Hat's page. | |||
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-1597.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.