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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pgjdbc | pgjdbc | < 42.7.2, < 42.6.1, < 42.5.5, < 42.4.4, < 42.3.9, < 42.2.28 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libpgjava | 42.7.2-1 | — |
| Debian 13 | libpgjava | 42.7.2-1 | — |
| Debian 12 | libpgjava | 42.5.5-0+deb12u1 | — |
| Debian 11 | libpgjava | 42.2.15-1+deb11u2 | DLA-3995-1 |
| Debian 10 | libpgjava | 42.2.5-2+deb10u4 | DLA-3812-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | libpgjava | No fix yet | — |
| Ubuntu 14.04 LTS | libpgjava | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | libpgjava | No fix yet | — |
| Ubuntu Pro 18.04 LTS | libpgjava | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | postgresql-jdbc | 42.2.28-1.el9_3 | RHSA-2024:1436 |
| RHEL 8 | postgresql-jdbc +1 | 42.2.14-3.el8_9 | RHSA-2024:1435 |
Show 12 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9.2 EUS | postgresql-jdbc | 42.2.28-1.el9_2 | RHSA-2024:1649 |
| RHEL 9.0 EUS | postgresql-jdbc | 42.2.28-1.el9_0 | RHSA-2024:1999 |
| RHEL 8.8 EUS | postgresql-jdbc +1 | 42.2.14-5.el8_8 | RHSA-2024:3313 |
| RHEL 8.6 TUS | postgresql-jdbc +1 | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| RHEL 8.6 E4S | postgresql-jdbc +1 | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| RHEL 8.6 AUS | postgresql-jdbc +1 | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| RHEL 8.4 TUS | postgresql-jdbc +1 | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| RHEL 8.4 E4S | postgresql-jdbc +1 | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| RHEL 8.4 AUS | postgresql-jdbc +1 | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| RHEL 8.2 TUS | postgresql-jdbc +1 | 42.2.3-5.el8_2 | RHSA-2024:2624 |
| RHEL 8.2 E4S | postgresql-jdbc +1 | 42.2.3-5.el8_2 | RHSA-2024:2624 |
| RHEL 8.2 AUS | postgresql-jdbc +1 | 42.2.3-5.el8_2 | RHSA-2024:2624 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | postgresql-jdbc | 42.2.28-1.el9_3 | ALSA-2024:1436 |
| AlmaLinux 8 | postgresql-jdbc +1 | 42.2.14-3.el8_9 | ALSA-2024:1435 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 9 | postgresql-jdbc | 42.2.28-1.el9_3 | RLSA-2024:1436 |
| Rocky Linux 8 | postgresql-jdbc | 42.2.14-3.el8_9 | RLSA-2024:1435 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SLES 15 SP4 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SLES 15 SP3 | postgresql-jdbc | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
| SLES 12 SP5 | postgresql-jdbc | 9.4-3.12.1 | SUSE-SU-2024:0771-1 |
Show 8 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP4 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SLES for SAP 15 SP3 | postgresql-jdbc | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
| SLES for SAP 12 SP5 | postgresql-jdbc | 9.4-3.12.1 | SUSE-SU-2024:0771-1 |
| SLE HPC 15 SP4 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SLE HPC 15 SP3 | postgresql-jdbc | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
| SUSE Manager Server 4.3 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE Manager Proxy 4.3 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE Enterprise Storage 7.1 | postgresql-jdbc | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | postgresql-jdbc | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | java-postgresql-jdbc | 42.6.2-r0 | — |
| Alpine v3.23 | java-postgresql-jdbc | 42.6.2-r0 | — |
| Alpine v3.22 | java-postgresql-jdbc | 42.6.2-r0 | — |
| Alpine v3.21 | java-postgresql-jdbc | 42.6.2-r0 | — |
| Alpine v3.20 | java-postgresql-jdbc | 42.6.2-r0 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | java-postgresql-jdbc | 42.6.2-r0 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | postgresql-jdbc | 42.2.28-1.el9_3 | ELSA-2024-1436 |
| Oracle Linux 8 | postgresql-jdbc +1 | 42.2.14-3.el8_9 | ELSA-2024-1435 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | dependency-track +1 | 4.10.1-r1 | — |
| Wolfi rolling | mariadb-10.11 +7 | 10.11.8-r2 | — |
| Wolfi rolling | mariadb-10.6 +7 | 10.6.17-r0 | — |
| Wolfi rolling | mariadb-11.2 +7 | 11.2.3-r2 | — |
| Wolfi rolling | trino +58 | 439-r2 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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 | GHSA-24rp-q3w6-vc56 |
Advisories 24
- ALSA-2024:1436 Important: postgresql-jdbc security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2024:1435 Important: postgresql-jdbc security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2024:4402 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:4375 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:3313 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:2624 Red Hat Security Advisory: postgresql-jdbc : Security Update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:1999 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:1649 Red Hat Security Advisory: postgresql-jdbc: security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:1436 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- RHSA-2024:1435 Red Hat Security Advisory: postgresql-jdbc security update Red Hat Security Advisories (RHSA) · Aug 5, 2026
- WID-SEC-2024-0424 PostgreSQL JDBC Driver: Schwachstelle ermöglicht SQL-Injection BSI CERT-Bund (WID) · Mar 23, 2026
- DLA-3995-1 libpgjava - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3812-1 libpgjava - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2024:1435 Important: postgresql-jdbc security update Rocky Linux Security Advisories · Feb 4, 2026
- SUSE-SU-2024:0769-1 Security update for postgresql-jdbc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0773-1 Security update for postgresql-jdbc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0771-1 Security update for postgresql-jdbc SUSE / openSUSE Security Updates · Feb 4, 2026
- RLSA-2024:1436 Important: postgresql-jdbc security update Rocky Linux Security Advisories · Oct 9, 2025
- WID-SEC-2024-0899 Oracle Fusion Middleware: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jun 9, 2025
- WID-SEC-2024-1210 Atlassian Confluence: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jun 3, 2024
- NCSC-2024-0231 Kwetsbaarheden verholpen in Atlassian producten NCSC-NL (Netherlands) · May 22, 2024
- WID-SEC-2024-1214 Atlassian Jira Software (Data Center und Server): Mehrere Schwachstellen BSI CERT-Bund (WID) · May 21, 2024
- ELSA-2024-1435 Important: postgresql-jdbc security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Mar 20, 2024
- ELSA-2024-1436 Important: postgresql-jdbc security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Mar 20, 2024
References
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56
- https://www.enterprisedb.com/docs/security/assessments/cve-2024-1597/
- https://www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU/
- https://security.netapp.com/advisory/ntap-20240419-0008/
- http://www.openwall.com/lists/oss-security/2024/04/02/6
- https://lists.debian.org/debian-lts-announce/2024/05/msg00007.html