CVE-2024-1597: Libpgjava · pgjdbc, the PostgreSQL JDBC Driver, allows attacker to inject SQL if using
Affects libpgjavaSource GCVE Database
Not known to be exploited · CVSS 10.0 Critical.
Data as of 5 Nov 2026, 00:01 UTC
Thin evidence
One scorer or none| CNA (PostgreSQL) | CVSS 3.1 | 10.0 |
|---|
- EPSS
- 4.8% chance of exploitation in 30 days – higher than 91% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 19 Feb 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 22.04 LTSlibpgjavapkg:deb/ubuntu/libpgjava?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu Pro 20.04 LTSlibpgjavapkg:deb/ubuntu/libpgjava?arch=source&distro=esm-apps/focalOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTSlibpgjavapkg:deb/ubuntu/libpgjava?arch=source&distro=esm-apps/bionicOther threats | Affected
| Fixed in– |
Ubuntu 14.04 LTSlibpgjavapkg:deb/ubuntu/libpgjava?arch=source&distro=trustyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Users should upgrade to fixed versions 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, or 42.2.28 or later. Avoid using the PreferQueryMode=SIMPLE setting if possible, as the default mode is not vulnerable. Patch status is confirmed by the presence of fixed versions. No other mitigations are indicated.
Description
CVE-2024-1597 is a critical SQL injection vulnerability in the PostgreSQL JDBC Driver (pgjdbc) when using the non-default PreferQueryMode=SIMPLE setting. An attacker can craft a specific payload with numeric and string placeholders on the same line to inject SQL, bypassing parameterized query protections. This affects multiple versions of the driver prior to 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, and 42.2.28.
References
- ubuntu.com/security/CVE-2024-1597 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/93b0fcb2711d9c1e3a2a03134369738a02a58b40 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/06abfb78a627277a580d4df825f210e96a4e14ee (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/1b1d6b53eca90409af0069d5327d4fdf8d40a255 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/475e3e2af3033c666fc1c0015159b35455118ae5 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/b9b3777671c8a5cc580e1985f61337d39d47c730 (opens in a new tab)
- github.com/pgjdbc/pgjdbc/commit/990d63f6be401ab40de5eb303a75924c9e71903c (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-1597 (opens in a new tab)