CVEBrief

Home / pgjdbc / pgjdbc / CVE-2024-1597

CVE-2024-1597: is it exploited, and which versions of pgjdbc are affected and fixed?

CVE-2024-1597 is a SQL injection vulnerability in pgjdbc. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:38 UTC). Affected: org.postgresql:postgresql before 42.2.28, org.postgresql:postgresql from 42.3.0 before 42.3.9, org.postgresql:postgresql from 42.4.0 before 42.4.4 and 3 more (GitHub advisory GHSA-24rp-q3w6-vc56). Fixed in 42.2.28, 42.3.9, 42.4.4, 42.5.5 and 2 more (GitHub advisory GHSA-24rp-q3w6-vc56). Severity: Critical (10.0, CVSS 3.1, from PostgreSQL).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:38 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:32 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 11:38 UTC
Affected
org.postgresql:postgresql before 42.2.28, org.postgresql:postgresql from 42.3.0 before 42.3.9, org.postgresql:postgresql from 42.4.0 before 42.4.4 and 3 more
GitHub advisory GHSA-24rp-q3w6-vc56
Fixed in
42.2.28, 42.3.9, 42.4.4, 42.5.5 and 2 more
GitHub advisory GHSA-24rp-q3w6-vc56
Severity
Critical 10.0
CVSS 3.1 from PostgreSQL
Exploit odds (EPSS)
4.81% in 30 days
higher than 92% of CVEs; FIRST, December 2, 2026

What is 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.

From the CVE record by PostgreSQL, last updated November 3, 2025, 21:52 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
pgjdbcpgjdbc< 42.7.2
< 42.6.1
< 42.5.5
< 42.4.4
< 42.3.9
< 42.2.28

As the CVE record by PostgreSQL states it, last updated November 3, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
Mavenorg.postgresql:postgresql< 42.2.2842.2.28GHSA-24rp-q3w6-vc56
Mavenorg.postgresql:postgresql>= 42.3.0, < 42.3.942.3.9GHSA-24rp-q3w6-vc56
Mavenorg.postgresql:postgresql>= 42.4.0, < 42.4.442.4.4GHSA-24rp-q3w6-vc56
Mavenorg.postgresql:postgresql>= 42.5.0, < 42.5.542.5.5GHSA-24rp-q3w6-vc56
Mavenorg.postgresql:postgresql>= 42.6.0, < 42.6.142.6.1GHSA-24rp-q3w6-vc56
Mavenorg.postgresql:postgresql>= 42.7.0, < 42.7.242.7.2GHSA-24rp-q3w6-vc56

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated February 21, 2024. Summary: org.postgresql:postgresql vulnerable to SQL Injection via line comment generation.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
postgresqlpostgresql jdbc driverbefore 42.2.28application
postgresqlpostgresql jdbc driverfrom 42.3.0 before 42.3.9application
postgresqlpostgresql jdbc driverfrom 42.4.0 before 42.4.4application
postgresqlpostgresql jdbc driverfrom 42.5.0 before 42.5.5application
postgresqlpostgresql jdbc driverfrom 42.6.0 before 42.6.1application
postgresqlpostgresql jdbc driverfrom 42.7.0 before 42.7.2application
fedoraprojectfedora40operating system

NVD analysis (status Modified), last modified June 17, 2026, 07:04 UTC.

How severe is CVE-2024-1597?

ScoreVersionVectorSource
Critical 10.0CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HPostgreSQL
Critical 9.8CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2024-1597 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
CISA SSVC
Exploitation: poc; automatable: yes; technical impact: total (CISA ADP, April 10, 2024)
EPSS
4.81% probability of exploitation activity in the next 30 days, percentile 92.2 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Is there a workaround? (from the CVE record)

Don't use SimpleQuery mode

Where are the vendor advisories and references?

Who found and reported it?

As published in the CVE record; contact details are removed.

When was it published, and where is the official record?

Reserved
February 16, 2024
Published
February 19, 2024, 12:58 UTC
CVE record updated
November 3, 2025, 21:52 UTC by PostgreSQL
NVD
Modified, last modified June 17, 2026, 07:04 UTC
Last checked
CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:32 UTC; KEV December 3, 2026, 11:38 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect pgjdbc?

Every CVE in pgjdbc

Questions about CVE-2024-1597

Is CVE-2024-1597 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:38 UTC. FIRST's EPSS gives it a 4.81% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of pgjdbc are affected by CVE-2024-1597?

org.postgresql:postgresql before 42.2.28, org.postgresql:postgresql from 42.3.0 before 42.3.9, org.postgresql:postgresql from 42.4.0 before 42.4.4, org.postgresql:postgresql from 42.5.0 before 42.5.5, org.postgresql:postgresql from 42.6.0 before 42.6.1 and org.postgresql:postgresql from 42.7.0 before 42.7.2, per the GitHub advisory GHSA-24rp-q3w6-vc56. The tables above give every range the sources list.

Which version fixes CVE-2024-1597?

42.2.28, 42.3.9, 42.4.4, 42.5.5, 42.6.1 and 42.7.2, per the GitHub advisory GHSA-24rp-q3w6-vc56. Check the vendor's advisory before you rely on it.

How severe is CVE-2024-1597?

Critical (10.0, CVSS 3.1, from PostgreSQL). The severity table above shows each score with its source.

Where is the official record of CVE-2024-1597?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.