CVE-2024-1597
A public proof of concept exists; no exploitation attested.
- Published2024-02-19
- Fixed in42.7.2 · 42.6.1 · 42.5.5 · 42.4.4 · 42.3.9 · 42.2.28
- WeaknessCWE-89
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
pgjdbc, the PostgreSQL JDBC Driver, allows 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. Versions before 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, and 42.2.28 are affected.
Timeline
dates in UTC- 2024-02-1913:15CVE publishedNVD
Versions per branch
CISA-ADP · NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 42.7 | < 42.7.2 | 42.7.2 | CISA-ADP |
| 42.6 | < 42.6.1 | 42.6.1 | CISA-ADP |
| 42.5 | < 42.5.5 | 42.5.5 | CISA-ADP |
| 42.4 | < 42.4.4 | 42.4.4 | CISA-ADP |
| 42.3 | < 42.3.9 | 42.3.9 | CISA-ADP |
| 42.2 | < 42.2.28 | 42.2.28 | CISA-ADP |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 42.7 | ≥ 42.7.0, < 42.7.2 | 42.7.2 | NVD · OSV |
| 42.6 | ≥ 42.6.0, < 42.6.1 | 42.6.1 | NVD · OSV |
| 42.5 | ≥ 42.5.0, < 42.5.5 | 42.5.5 | NVD · OSV |
| 42.4 | ≥ 42.4.0, < 42.4.4 | 42.4.4 | NVD · OSV |
| 42.3 | ≥ 42.3.0, < 42.3.9 | 42.3.9 | NVD · OSV |
| 42.2 | < 42.2.28 | 42.2.28 | NVD · OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 40.x | = 40 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As PostgreSQL, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- pgjdbcAffected
- = < 42.7.2no fix stated
- = < 42.6.1no fix stated
- = < 42.5.5no fix stated
- = < 42.4.4no fix stated
- = < 42.3.9no fix stated
- = < 42.2.28no fix stated
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-06-10
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- apache-hiveCleanStartall versions · fixed in 3.1.3-r3
- dependency-trackWolfiall versions · fixed in 4.10.1-r1and 1 other package
- dependency-trackChainguardall versions · fixed in 4.10.1-r1and 1 other package
- io.root.org.postgresql:postgresqlRoot:Mavenall versions · fixed in 42.6.0-root.io.1
- io.root.org.postgresql:postgresqlRoot:Mavenall versions · fixed in 42.5.1-root.io.1
- io.root.org.postgresql:postgresqlRoot:Mavenall versions · fixed in 42.5.1-root.io.2
- io.root.org.postgresql:postgresqlRoot:Mavenall versions · fixed in 42.6.0-root.io.2
- io.root.org.postgresql:postgresqlRoot:Mavenall versions · fixed in 42.6.0-root.io.3
74 more package ranges on OSV.dev
Vendor advisories
pgjdbc: PostgreSQL JDBC Driver allows attacker to inject SQL if using PreferQueryMode=SIMPLE
pgjdbc as a component of Red Hat build of Apache Camel 4 for Quarkus 3 · pgjdbc as a component of Red Hat build of Apache Camel for Spring Boot 3 · pgjdbc as a component of Red Hat build of OptaPlanner 8 · +7 more
Red Hat Security Advisory: Red Hat Integration Camel K 1.10.7 release and security update.
Red Hat Security Advisory: Red Hat Build of Apache Camel 4.4.1 for Spring Boot security update.
Red Hat Security Advisory: postgresql-jdbc security update
Red Hat Security Advisory: postgresql-jdbc security update
Red Hat Security Advisory: Release of OpenShift Serverless Logic 1.33.0 security update & enhancements
10 more advisories
Fix
- Update Pgjdbc to 42.7.2 · 42.6.1 · 42.5.5 · 42.4.4 · 42.3.9 · 42.2.28
- Vendor fix Red Hat Product Security RHSA-2024:5056 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
- Vendor fix Red Hat Product Security RHSA-2024:4402 · 9 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- Vendor fix Red Hat Product Security RHSA-2024:4057 · 26 productsSee the Red Hat OpenShift serverless 1.33 documentation at: https://access.redhat.com/documentation/en-us/red_hat_openshift_serverless/1.33
- Vendor fix Red Hat Product Security RHBA-2024:2108 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on.
- Vendor fix Red Hat Product Security RHSA-2024:1999 · 2 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258 If the postgresql service is running, it will be automatically restarted after installing t…
- Vendor fix Red Hat Product Security RHSA-2024:1649 · 2 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258 If the postgresql service is running, it will be automatically restarted after installing t…
Advisories and patches
- www.enterprisedb.comRelease Notes
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- CISA-ADP (SSVC)PoC stated2024-04-10
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2024-04-10
- CNACVSS 3.110known since 2026-10-23
- NVDCVSS 3.19.8read 2026-10-23
- CNAweakness (CWE)CWE-89known since 2026-10-23
- NVDweakness (CWE)CWE-89read 2026-10-23
- FIRST EPSSEPSS score4.8 %2026-11-08
- OSVaffected packages—
- GitHub AdvisoriesadvisoryCRITICAL2024-02-21
Identifiers
- BIT-postgresql-jdbc-driver-2024-1597same flawBitnami · Apache-2.0
- CGA-23cr-9wrj-xg5rsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-24jw-57qm-483fsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-256p-889g-gcj6same flawChainguard · CC-BY-NC-ND-4.0
- CGA-26wj-w2w3-cq6hsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-26xr-hpwm-hr8rsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-27jm-x265-v6f7same flawChainguard · CC-BY-NC-ND-4.0
- CGA-287w-wgf2-vvp5same flawChainguard · CC-BY-NC-ND-4.0
- CGA-29pw-xcpm-p3r9same flawChainguard · CC-BY-NC-ND-4.0
- CGA-2h4j-4w9p-gcc4same flawChainguard · CC-BY-NC-ND-4.0
- CGA-2mj4-6432-hwxfsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-2vw9-44hg-hm99same flawChainguard · CC-BY-NC-ND-4.0
- CGA-3489-3384-w23qsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-37h8-3j7p-4v4vsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-39wh-mrpm-29wcsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-3h3x-3gv7-vf87same flawChainguard · CC-BY-NC-ND-4.0
- CGA-3hpr-hh9v-c6jgsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-3m5g-55p7-qm3xsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-3r92-7fgf-fffcsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-45w4-8958-qj5xsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-465f-rm87-7mv4same flawChainguard · CC-BY-NC-ND-4.0
- CGA-48f2-xw9w-g4vrsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-49v5-v858-vp9csame flawChainguard · CC-BY-NC-ND-4.0
- CGA-49w2-g2fr-f835same flawChainguard · CC-BY-NC-ND-4.0
- CGA-4f92-948c-vm77same flawChainguard · CC-BY-NC-ND-4.0
- CGA-4mrw-x673-pp6wsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-4q26-xgw7-2596same flawChainguard · CC-BY-NC-ND-4.0
- CGA-4v9c-545r-722jsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5638-8v4r-q7f8same flawChainguard · CC-BY-NC-ND-4.0
- CGA-583c-j848-xg65same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5f88-78mq-rmh9same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5j2j-wfhh-xfmmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5j39-qc24-p827same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5j57-88v5-vwj6same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5m35-pxmw-6wmhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5mvh-7374-9g37same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5pjm-33mf-3rfhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5v53-vcwj-rvjcsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5w5j-95gm-vhvpsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-652p-hgpg-vvc4same flawChainguard · CC-BY-NC-ND-4.0
- CGA-68rr-p265-qp8hsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-68xv-9mc6-4jjhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-69v7-w793-79w6same flawChainguard · CC-BY-NC-ND-4.0
- CGA-6c5f-wqfm-837csame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6f3h-8qh3-9qpcsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6hw3-hp63-79cmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6jpv-9q35-h86psame flawChainguard · CC-BY-NC-ND-4.0
- CGA-72xc-4xr6-mq6fsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-763v-v4xc-rwqmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-7957-8jr3-4gv4same flawChainguard · CC-BY-NC-ND-4.0
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2024-02-19
- Last Modified
- 2026-06-17
- NVD status
- Modified
- GitHub Advisory
- GHSA-24rp-q3w6-vc56
Frequently asked questions
What is CVE-2024-1597?
Is CVE-2024-1597 actively exploited?
What is the CVSS score for CVE-2024-1597?
Running PostgreSQL? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-24rp-q3w6-vc56
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0