CVE-2024-1597
pgjdbc SQL Injection via line comment generation
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
10.0
pgjdbc SQL Injection via line comment generation
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.
- Record
CVE-2024-1597- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2024-0465
10.0
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.
- Record
EUVD-2024-0465- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-24rp-q3w6-vc56
10.0
org.postgresql:postgresql vulnerable to SQL Injection via line comment generation
Impact
SQL injection is possible when using the non-default connection property preferQueryMode=simple in combination with application code that has a vulnerable SQL that negates a parameter value.
There is no vulnerability in the driver when using the default query mode. Users that do not override the query mode are not impacted.
Exploitation
To exploit this behavior the following conditions must be met:
- A placeholder for a numeric value must be immediately preceded by a minus (i.e.
-) - There must be a second placeholder for a string value after the first placeholder on the same line.
- Both parameters must be user controlled.
The prior behavior of the driver when operating in simple query mode would inline the negative value of the first parameter and cause the resulting line to be treated as a -- SQL comment. That would extend to the beginning of the next parameter and cause the quoting of that parameter to be consumed by the comment line. If that string parameter includes a newline, the resulting text would appear unescaped in the resulting SQL.
When operating in the default extended query mode this would not be an issue as the parameter values are sent separately to the server. Only in simple query mode the parameter values are inlined into the executed SQL causing this issue.
Example
PreparedStatement stmt = conn.prepareStatement("SELECT -?, ?");
stmt.setInt(1, -1);
stmt.setString(2, "\nWHERE false --");
ResultSet rs = stmt.executeQuery();
The resulting SQL when operating in simple query mode would be:
SELECT --1,'
WHERE false --'
The contents of the second parameter get injected into the command. Note how both the number of result columns and the WHERE clause of the command have changed. A more elaborate example could execute arbitrary other SQL commands.
Patch
Problem will be patched upgrade to 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, 42.2.28, 42.2.28.jre7
The patch fixes the inlining of parameters by forcing them all to be serialized as wrapped literals. The SQL in the prior example would be transformed into:
SELECT -('-1'::int4), ('
WHERE false --')
Workarounds
Do not use the connection propertypreferQueryMode=simple. (NOTE: If you do not explicitly specify a query mode then you are using the default of extended and are not impacted by this issue.)
- Record
GHSA-24rp-q3w6-vc56- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
NVD
10.0
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.
- Record
CVE-2024-1597- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVALPINE-CVE-2024-1597
9.8
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.
- Record
ALPINE-CVE-2024-1597- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSV
10.0
pgjdbc SQL Injection via line comment generation
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.
- Record
CVE-2024-1597- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
Show 28 moreShow less
OSVDEBIAN-CVE-2024-1597
9.8
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.
- Record
DEBIAN-CVE-2024-1597- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-24rp-q3w6-vc56
10.0
org.postgresql:postgresql vulnerable to SQL Injection via line comment generation
Impact
SQL injection is possible when using the non-default connection property preferQueryMode=simple in combination with application code that has a vulnerable SQL that negates a parameter value.
There is no vulnerability in the driver when using the default query mode. Users that do not override the query mode are not impacted.
Exploitation
To exploit this behavior the following conditions must be met:
- A placeholder for a numeric value must be immediately preceded by a minus (i.e.
-) - There must be a second placeholder for a string value after the first placeholder on the same line.
- Both parameters must be user controlled.
The prior behavior of the driver when operating in simple query mode would inline the negative value of the first parameter and cause the resulting line to be treated as a -- SQL comment. That would extend to the beginning of the next parameter and cause the quoting of that parameter to be consumed by the comment line. If that string parameter includes a newline, the resulting text would appear unescaped in the resulting SQL.
When operating in the default extended query mode this would not be an issue as the parameter values are sent separately to the server. Only in simple query mode the parameter values are inlined into the executed SQL causing this issue.
Example
PreparedStatement stmt = conn.prepareStatement("SELECT -?, ?");
stmt.setInt(1, -1);
stmt.setString(2, "\nWHERE false --");
ResultSet rs = stmt.executeQuery();
The resulting SQL when operating in simple query mode would be:
SELECT --1,'
WHERE false --'
The contents of the second parameter get injected into the command. Note how both the number of result columns and the WHERE clause of the command have changed. A more elaborate example could execute arbitrary other SQL commands.
Patch
Problem will be patched upgrade to 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, 42.2.28, 42.2.28.jre7
The patch fixes the inlining of parameters by forcing them all to be serialized as wrapped literals. The SQL in the prior example would be transformed into:
SELECT -('-1'::int4), ('
WHERE false --')
Workarounds
Do not use the connection propertypreferQueryMode=simple. (NOTE: If you do not explicitly specify a query mode then you are using the default of extended and are not impacted by this issue.)
- Record
GHSA-24rp-q3w6-vc56- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVOESA-2024-1237
10.0
postgresql-jdbc security update
PostgreSQL JDBC Driver (PgJDBC for short) allows Java programs to connect to a PostgreSQL database using standard, database independent Java code. Is an open source JDBC driver written in Pure Java (Type 4), and communicates in the PostgreSQL native network protocol.
Security Fix(es):
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.8 are affected.(CVE-2024-1597)
- Record
OESA-2024-1237- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHLW-2026-b44d1f7dac7a0d3d
7.1
Lightwell Security Advisory: postgresql 42.3.3.rhlw-00006
Red Hat Lightwell has released org.postgresql:postgresql 42.3.3.rhlw-00006 with backported fixes for CVE-2022-31197, CVE-2022-41946, CVE-2024-1597, and CVE-2026-42198.
CVE-2022-31197: SQL Injection in ResultSet.refreshRow() with malicious column names in pgjdbc
CVE-2022-41946: TemporaryFolder on unix-like systems does not limit access to created files in pgjdbc
CVE-2024-1597: pgjdbc SQL Injection via line comment generation
CVE-2026-42198: pgjdbc: Unbounded PBKDF2 iterations in SCRAM authentication allows CPU exhaustion DoS
This patched artifact is a drop-in replacement for org.postgresql:postgresql 42.3.3 from Maven Central.
- Record
RHLW-2026-b44d1f7dac7a0d3d- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:1435
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:1435- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:1436
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:1436- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:1649
9.8
Red Hat Security Advisory: postgresql-jdbc: security update
- Record
RHSA-2024:1649- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:1999
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:1999- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:2624
9.8
Red Hat Security Advisory: postgresql-jdbc : Security Update
- Record
RHSA-2024:2624- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:3313
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:3313- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:4375
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:4375- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2024:4402
9.8
Red Hat Security Advisory: postgresql-jdbc security update
- Record
RHSA-2024:4402- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRLSA-2024:1436
9.8
Important: postgresql-jdbc security update
PostgreSQL is an advanced object-relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database.
Security Fix(es):
- PostgreSQL JDBC Driver allows attacker to inject SQL if using PreferQueryMode=SIMPLE (CVE-2024-1597)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
RLSA-2024:1436- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-1597
10.0
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.
- Record
UBUNTU-CVE-2024-1597- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-06
OSVALSA-2024:1435 No score
Important: postgresql-jdbc security update
PostgreSQL is an advanced object-relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database.
Security Fix(es):
- PostgreSQL JDBC Driver allows attacker to inject SQL if using PreferQueryMode=SIMPLE (CVE-2024-1597)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
ALSA-2024:1435- Updated
- 2026-11-02
OSVALSA-2024:1436 No score
Important: postgresql-jdbc security update
PostgreSQL is an advanced object-relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database.
Security Fix(es):
- PostgreSQL JDBC Driver allows attacker to inject SQL if using PreferQueryMode=SIMPLE (CVE-2024-1597)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
ALSA-2024:1436- Updated
- 2026-11-02
OSVBIT-postgresql-jdbc-driver-2024-1597 No score
pgjdbc SQL Injection via line comment generation
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.
- Record
BIT-postgresql-jdbc-driver-2024-1597- Updated
- 2026-11-02
OSVCLSA-2025-1754870602 No score
TuxCare security update for org.postgresql:postgresql (1 CVE)
TuxCare rebuilt org.postgresql:postgresql to address 1 CVE. Fixed in 42.5.0-tuxcare.1.
- Record
CLSA-2025-1754870602- Updated
- 2026-11-02
OSVCLSA-2025-1754870603 No score
TuxCare security update for org.postgresql:postgresql (3 CVEs)
TuxCare rebuilt org.postgresql:postgresql to address 3 CVEs. Fixed in 42.2.16-tuxcare.1.
- Record
CLSA-2025-1754870603- Updated
- 2026-11-02
OSVCLSA-2025-1762243790 No score
postgresql-jdbc: Fix of CVE-2024-1597
- update to 42.2.28
- CVE-2024-1597: fix SQL injection in PostgreSQL JDBC simple query mode
- Record
CLSA-2025-1762243790- Updated
- 2026-11-02
OSVCLSA-2026-1781608329 No score
postgresql-jdbc: Fix of CVE-2026-42198
- update to 42.2.28
- CVE-2024-1597: fix SQL injection in PostgreSQL JDBC simple query mode
- Record
CLSA-2026-1781608329- Updated
- 2026-11-02
OSVMGASA-2024-0120 No score
Updated postgresql-jdbc packages fix security vulnerability
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. (CVE-2024-1597)
- Record
MGASA-2024-0120- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13734-1 No score
postgresql-jdbc-42.7.2-1.1 on GA media
These are all security issues fixed in the postgresql-jdbc-42.7.2-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13734-1- Updated
- 2026-11-02
OSVRLSA-2024:1435 No score
Important: postgresql-jdbc security update
PostgreSQL is an advanced object-relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database.
Security Fix(es):
- PostgreSQL JDBC Driver allows attacker to inject SQL if using PreferQueryMode=SIMPLE (CVE-2024-1597)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
- Record
RLSA-2024:1435- Updated
- 2026-11-02
OSVROOT-APP-MAVEN-CVE-2024-1597 No score
CVE-2024-1597 in org.postgresql:postgresql - Patched by Root
Root has patched CVE-2024-1597 in the org.postgresql:postgresql package for Root:Maven. Multiple fixed versions available.
- Record
ROOT-APP-MAVEN-CVE-2024-1597- Updated
- 2026-11-02
OSVSUSE-SU-2024:0769-1 No score
Security update for postgresql-jdbc
This update for postgresql-jdbc fixes the following issues:
- CVE-2024-1597: Fixed SQL Injection via line comment generation (bsc#1220644).
- Record
SUSE-SU-2024:0769-1- Updated
- 2026-11-02
OSVSUSE-SU-2024:0771-1 No score
Security update for postgresql-jdbc
This update for postgresql-jdbc fixes the following issues:
- CVE-2024-1597: Fixed SQL Injection via line comment generation (bsc#1220644).
- Record
SUSE-SU-2024:0771-1- Updated
- 2026-11-02
OSVSUSE-SU-2024:0773-1 No score
Security update for postgresql-jdbc
This update for postgresql-jdbc fixes the following issues:
- CVE-2024-1597: Fixed SQL Injection via line comment generation (bsc#1220644).
- Record
SUSE-SU-2024:0773-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.postgresql:postgresqlMaven |
before 42.2.28 | 42.2.28 |
org.postgresql:postgresqlMaven |
42.3.0 up to 42.3.9 | 42.3.9 |
org.postgresql:postgresqlMaven |
42.4.0 up to 42.4.4 | 42.4.4 |
org.postgresql:postgresqlMaven |
42.5.0 up to 42.5.5 | 42.5.5 |
org.postgresql:postgresqlMaven |
42.6.0 up to 42.6.1 | 42.6.1 |
org.postgresql:postgresqlMaven |
42.7.0 up to 42.7.2 | 42.7.2 |
java-postgresql-jdbcAlpine:v3.19 |
before 42.6.2-r0 | 42.6.2-r0 |
java-postgresql-jdbcAlpine:v3.20 |
before 42.6.2-r0 | 42.6.2-r0 |
java-postgresql-jdbcAlpine:v3.21 |
before 42.6.2-r0 | 42.6.2-r0 |
java-postgresql-jdbcAlpine:v3.22 |
before 42.6.2-r0 | 42.6.2-r0 |
Show 77 moreShow less
| Package | Affected | Fixed |
|---|---|---|
java-postgresql-jdbcAlpine:v3.23 |
before 42.6.2-r0 | 42.6.2-r0 |
java-postgresql-jdbcAlpine:v3.24 |
before 42.6.2-r0 | 42.6.2-r0 |
postgresql-jdbcAlmaLinux:8 |
before 42.2.14-3.el8_9 | 42.2.14-3.el8_9 |
postgresql-jdbc-javadocAlmaLinux:8 |
before 42.2.14-3.el8_9 | 42.2.14-3.el8_9 |
postgresql-jdbcAlmaLinux:9 |
before 42.2.28-1.el9_3 | 42.2.28-1.el9_3 |
postgresql-jdbc-driverBitnami |
before 42.2.28, 42.3.0 up to 42.3.9, 42.4.0 up to 42.4.4, 42.5.0 up to 42.5.5, 42.6.0 up to 42.6.1, 42.7.0 up to 42.7.2 | 42.2.2842.3.942.4.442.5.542.6.142.7.2 |
org.postgresql:postgresqlTuxCare:Maven |
42.5.0 up to 42.5.0-tuxcare.1 | 42.5.0-tuxcare.1 |
org.postgresql:postgresqlTuxCare:Maven From an advisory covering 3 CVEs |
42.2.16 up to 42.2.16-tuxcare.1 | 42.2.16-tuxcare.1 |
postgresql-jdbcTuxCare:AlmaLinux:9.2 |
before 42.2.28-1.el9.tuxcare.els1 | 42.2.28-1.el9.tuxcare.els1 |
postgresql-jdbc-javadocTuxCare:AlmaLinux:9.2 |
before 42.2.28-1.el9.tuxcare.els1 | 42.2.28-1.el9.tuxcare.els1 |
postgresql-jdbcTuxCare:AlmaLinux:9.6 From an advisory covering 2 CVEs |
before 42.2.28-1.el9_3.tuxcare.els1 | 42.2.28-1.el9_3.tuxcare.els1 |
postgresql-jdbc-javadocTuxCare:AlmaLinux:9.6 From an advisory covering 2 CVEs |
before 42.2.28-1.el9_3.tuxcare.els1 | 42.2.28-1.el9_3.tuxcare.els1 |
libpgjavaDebian:12 |
before 42.5.5-0+deb12u1, plus listed versions 42.5.4-1 |
42.5.5-0+deb12u1 |
libpgjavaDebian:13 |
before 42.7.2-1 | 42.7.2-1 |
libpgjavaDebian:14 |
before 42.7.2-1 | 42.7.2-1 |
libpgjavaDebian:10 |
before 42.2.5-2+deb10u4, plus listed versions 42.2.5-242.2.5-2+deb10u142.2.5-2+deb10u242.2.5-2+deb10u3 |
42.2.5-2+deb10u4 |
libpgjavaDebian:11 From an advisory covering 3 CVEs |
before 42.2.15-1+deb11u2, plus listed versions 42.2.15-142.2.15-1+deb11u1 |
42.2.15-1+deb11u2 |
org.postgresql:postgresqlMaven |
before 42.2.28, plus listed versions 42.0.042.0.0.jre642.0.0.jre742.1.042.1.0.jre7 Show 45 moreShow less42.1.142.1.1.jre642.1.1.jre742.1.242.1.2.jre642.1.2.jre742.1.342.1.3.jre642.1.3.jre742.1.442.1.4.jre642.1.4.jre742.2.042.2.0.jre642.2.0.jre742.2.142.2.1.jre642.2.1.jre742.2.1042.2.10.jre642.2.10.jre742.2.1142.2.11.jre642.2.11.jre742.2.1242.2.12.jre642.2.12.jre742.2.1342.2.13.jre642.2.13.jre742.2.1442.2.14.jre642.2.14.jre742.2.1542.2.15.jre642.2.15.jre742.2.1642.2.16.jre642.2.16.jre742.2.1742.2.17.jre642.2.17.jre742.2.1842.2.18.jre642.2.18.jre7 |
42.2.28 |
org.postgresql:postgresqlMaven |
42.3.0 up to 42.3.9, plus listed versions 42.3.142.3.242.3.342.3.442.3.542.3.642.3.742.3.8 |
42.3.9 |
org.postgresql:postgresqlMaven |
42.4.0 up to 42.4.4, plus listed versions 42.4.142.4.242.4.3 |
42.4.4 |
org.postgresql:postgresqlMaven |
42.5.0 up to 42.5.5, plus listed versions 42.5.142.5.242.5.342.5.4 |
42.5.5 |
org.postgresql:postgresqlMaven |
42.7.0 up to 42.7.2, plus listed versions 42.7.1 |
42.7.2 |
postgresql-jdbcMageia:9 |
before 42.5.6-1.mga9 | 42.5.6-1.mga9 |
postgresql-jdbcopenEuler:20.03-LTS-SP1 |
before 42.4.1-3.oe1 | 42.4.1-3.oe1 |
postgresql-jdbcopenEuler:20.03-LTS-SP4 |
before 42.4.1-3.oe2003sp4 | 42.4.1-3.oe2003sp4 |
postgresql-jdbcopenEuler:22.03-LTS |
before 42.4.1-3.oe2203sp3 | 42.4.1-3.oe2203sp3 |
postgresql-jdbcopenEuler:22.03-LTS-SP1 |
before 42.4.1-3.oe2203sp1 | 42.4.1-3.oe2203sp1 |
postgresql-jdbcopenEuler:22.03-LTS-SP2 |
before 42.4.1-3.oe2203sp2 | 42.4.1-3.oe2203sp2 |
postgresql-jdbcopenEuler:22.03-LTS-SP3 |
before 42.4.1-3.oe2203sp3 | 42.4.1-3.oe2203sp3 |
org.postgresql:postgresqlRed Hat Lightwell:Maven From an advisory covering 4 CVEs |
before 42.3.3.rhlw-00006, plus listed versions 42.0.042.0.0.jre642.0.0.jre742.1.042.1.0.jre7 Show 45 moreShow less42.1.142.1.1.jre642.1.1.jre742.1.242.1.2.jre642.1.2.jre742.1.342.1.3.jre642.1.3.jre742.1.442.1.4.jre642.1.4.jre742.2.042.2.0.jre642.2.0.jre742.2.142.2.1.jre642.2.1.jre742.2.1042.2.10.jre642.2.10.jre742.2.1142.2.11.jre642.2.11.jre742.2.1242.2.12.jre642.2.12.jre742.2.1342.2.13.jre642.2.13.jre742.2.1442.2.14.jre642.2.14.jre742.2.1542.2.15.jre642.2.15.jre742.2.1642.2.16.jre642.2.16.jre742.2.1742.2.17.jre642.2.17.jre742.2.1842.2.18.jre642.2.18.jre7 |
42.3.3.rhlw-00006 |
postgresql-jdbcRed Hat:enterprise_linux:8::appstream |
before 0:42.2.14-3.el8_9 | 0:42.2.14-3.el8_9 |
postgresql-jdbc-javadocRed Hat:enterprise_linux:8::appstream |
before 0:42.2.14-3.el8_9 | 0:42.2.14-3.el8_9 |
postgresql-jdbcRed Hat:enterprise_linux:9::appstream |
before 0:42.2.28-1.el9_3 | 0:42.2.28-1.el9_3 |
postgresql-jdbcRed Hat:rhel_eus:9.2::appstream |
before 0:42.2.28-1.el9_2 | 0:42.2.28-1.el9_2 |
postgresql-jdbcRed Hat:rhel_eus:9.0::appstream |
before 0:42.2.28-1.el9_0 | 0:42.2.28-1.el9_0 |
postgresql-jdbcRed Hat:rhel_aus:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbc-javadocRed Hat:rhel_aus:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbcRed Hat:rhel_e4s:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbc-javadocRed Hat:rhel_e4s:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbcRed Hat:rhel_tus:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbc-javadocRed Hat:rhel_tus:8.2::appstream |
before 0:42.2.3-5.el8_2 | 0:42.2.3-5.el8_2 |
postgresql-jdbcRed Hat:rhel_eus:8.8::appstream |
before 0:42.2.14-5.el8_8 | 0:42.2.14-5.el8_8 |
postgresql-jdbc-javadocRed Hat:rhel_eus:8.8::appstream |
before 0:42.2.14-5.el8_8 | 0:42.2.14-5.el8_8 |
postgresql-jdbcRed Hat:rhel_aus:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbc-javadocRed Hat:rhel_aus:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbcRed Hat:rhel_e4s:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbc-javadocRed Hat:rhel_e4s:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbcRed Hat:rhel_tus:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbc-javadocRed Hat:rhel_tus:8.4::appstream |
before 0:42.2.3-7.el8_4 | 0:42.2.3-7.el8_4 |
postgresql-jdbcRed Hat:rhel_aus:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbc-javadocRed Hat:rhel_aus:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbcRed Hat:rhel_e4s:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbc-javadocRed Hat:rhel_e4s:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbcRed Hat:rhel_tus:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbc-javadocRed Hat:rhel_tus:8.6::appstream |
before 0:42.2.3-5.el8_6 | 0:42.2.3-5.el8_6 |
postgresql-jdbcRocky Linux:8 |
before 0:42.2.14-3.el8_9 | 0:42.2.14-3.el8_9 |
postgresql-jdbcRocky Linux:9 |
before 0:42.2.28-1.el9_3 | 0:42.2.28-1.el9_3 |
org.postgresql:postgresqlRoot:Maven |
before 42.5.1-aikido.2 | 42.5.1-aikido.242.6.0-aikido.342.5.1-aikido.1 |
io.root.org.postgresql:postgresqlRoot:Maven |
before 42.6.0-root.io.1 | 42.6.0-root.io.142.6.0-root.io.242.5.1-root.io.242.6.0-root.io.342.5.1-root.io.1 |
postgresql-jdbcSUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS |
before 42.2.25-150300.3.14.1 | 42.2.25-150300.3.14.1 |
postgresql-jdbcSUSE:Linux Enterprise Server 15 SP3-LTSS |
before 42.2.25-150300.3.14.1 | 42.2.25-150300.3.14.1 |
postgresql-jdbcSUSE:Linux Enterprise Server for SAP Applications 15 SP3 |
before 42.2.25-150300.3.14.1 | 42.2.25-150300.3.14.1 |
postgresql-jdbcSUSE:Enterprise Storage 7.1 |
before 42.2.25-150300.3.14.1 | 42.2.25-150300.3.14.1 |
postgresql-jdbcSUSE:Linux Enterprise Server 12 SP5 |
before 9.4-3.12.1 | 9.4-3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 9.4-3.12.1 | 9.4-3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise Module for Server Applications 15 SP5 |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise Server 15 SP4-LTSS |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Linux Enterprise Server for SAP Applications 15 SP4 |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Manager Proxy 4.3 |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcSUSE:Manager Server 4.3 |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
postgresql-jdbcopenSUSE:Leap 15.5 |
before 42.2.25-150400.3.12.1 | 42.2.25-150400.3.12.1 |
libpgjavaUbuntu:14.04:LTS |
All versions, plus listed versions 9.2-1002-1 |
None known |
libpgjavaUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 9.4.1212-19.4.1212-1ubuntu0.1~esm1 |
None known |
libpgjavaUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 42.2.6-142.2.8-142.2.9-142.2.10-142.2.10-1ubuntu0.1~esm1 |
None known |
libpgjavaUbuntu:22.04:LTS |
All versions, plus listed versions 42.2.23-142.2.24-142.3.1-142.3.2-142.3.3-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| affected, facts | ||
| affected, aliases, references | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-1597 is a critical vulnerability (CVSS 10.0) in Pgjdbc, published February 19, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.81%, the 92nd percentile. Fixed in org.postgresql:postgresql 42.2.28.
References
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56
enterprisedb.com/docs/security/assessments/cve-2024-1597
enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes
lists.fedoraproject.org/archives/list/[email protected]/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU
security.netapp.com/advisory/ntap-20240419-0008
openwall.com/lists/oss-security/2024/04/02/6
Show 81 moreShow less
lists.debian.org/debian-lts-announce/2024/05/msg00007.html
sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw
lists.debian.org/debian-lts-announce/2024/12/msg00017.html
nvd.nist.gov/vuln/detail/CVE-2024-1597
github.com/pgjdbc/pgjdbc/commit/06abfb78a627277a580d4df825f210e96a4e14ee
github.com/pgjdbc/pgjdbc/commit/93b0fcb2711d9c1e3a2a03134369738a02a58b40
github.com/advisories/GHSA-24rp-q3w6-vc56
security.alpinelinux.org/vuln/CVE-2024-1597
access.redhat.com/errata/RHSA-2024:1435
access.redhat.com/security/cve/CVE-2024-1597
bugzilla.redhat.com/2266523
errata.almalinux.org/8/ALSA-2024-1435.html
access.redhat.com/errata/RHSA-2024:1436
errata.almalinux.org/9/ALSA-2024-1436.html
errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2025-1762243790.html
errata.tuxcare.com/els_os/tuxcare9.6esu/CLSA-2026-1781608329.html
nvd.nist.gov/vuln/detail/CVE-2026-42198
github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1597.json
security-tracker.debian.org/tracker/CVE-2024-1597
github.com/pgjdbc/pgjdbc
advisories.mageia.org/MGASA-2024-0120.html
bugs.mageia.org/show_bug.cgi?id=33051
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1237
github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31197.json
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-r38f-c4h4-hqq2
nvd.nist.gov/vuln/detail/CVE-2022-31197
github.com/pgjdbc/pgjdbc/commit/739e599d52ad80f8dcd6efedc6157859b1a9d637
github.com/advisories/GHSA-r38f-c4h4-hqq2
github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41946.json
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h
nvd.nist.gov/vuln/detail/CVE-2022-41946
github.com/pgjdbc/pgjdbc/commit/9008dc9aade6dbfe4efafcd6872ebc55f4699cf5
github.com/advisories/GHSA-562r-vg33-8x8h
github.com/pgjdbc/pgjdbc/releases/tag/REL42.7.11
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42198.json
access.redhat.com/errata/RHSA-2026:19098
access.redhat.com/errata/RHSA-2026:22304
access.redhat.com/errata/RHSA-2026:24348
access.redhat.com/errata/RHSA-2026:25030
access.redhat.com/errata/RHSA-2026:52928
access.redhat.com/errata/RHSA-2026:52929
access.redhat.com/errata/RHSA-2026:52930
access.redhat.com/errata/RHSA-2026:52978
access.redhat.com/errata/RHSA-2026:54532
access.redhat.com/errata/RHSA-2026:59277
access.redhat.com/errata/RHSA-2026:59278
access.redhat.com/errata/RHSA-2026:66488
access.redhat.com/errata/RHSA-2026:66545
access.redhat.com/security/cve/CVE-2026-42198
github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42198.json
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-98qh-xjc8-98pq
github.com/advisories/GHSA-98qh-xjc8-98pq
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=2266523
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_1435.json
cve.org/CVERecord?id=CVE-2024-1597
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_1436.json
access.redhat.com/errata/RHSA-2024:1649
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_1649.json
access.redhat.com/errata/RHSA-2024:1999
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_1999.json
access.redhat.com/errata/RHSA-2024:2624
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_2624.json
access.redhat.com/errata/RHSA-2024:3313
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_3313.json
access.redhat.com/errata/RHSA-2024:4375
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_4375.json
access.redhat.com/errata/RHSA-2024:4402
security.access.redhat.com/data/csaf/v2/advisories/2024/rhsa-2024_4402.json
errata.rockylinux.org/RLSA-2024:1435
errata.rockylinux.org/RLSA-2024:1436
suse.com/support/update/announcement/2024/suse-su-20240769-1
bugzilla.suse.com/1220644
suse.com/security/cve/CVE-2024-1597
suse.com/support/update/announcement/2024/suse-su-20240771-1
suse.com/support/update/announcement/2024/suse-su-20240773-1
ubuntu.com/security/CVE-2024-1597
github.com/pgjdbc/pgjdbc/commit/1b1d6b53eca90409af0069d5327d4fdf8d40a255
github.com/pgjdbc/pgjdbc/commit/475e3e2af3033c666fc1c0015159b35455118ae5
github.com/pgjdbc/pgjdbc/commit/b9b3777671c8a5cc580e1985f61337d39d47c730
github.com/pgjdbc/pgjdbc/commit/990d63f6be401ab40de5eb303a75924c9e71903c
Left out here: 224 versions. The JSON record has them.