CVE-2024-1597
published critical CVSS 3.1 · 10.0pgjdbc SQL Injection via line comment generation
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pgjdbc | — | pgjdbc< 42.7.2 · < 42.6.1 · < 42.5.5 · < 42.4.4 · < 42.3.9 · < 42.2.28 | Affected | Not stated | PostgreSQL |
| pgjdbc | — | pgjdbc0 to < 42.7.2 · 0 to < 42.6.1 · 0 to < 42.5.5 · 0 to < 42.4.4 · 0 to < 42.3.9 · 0 to < 42.2.28 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| AlmaLinux | 8 | postgresql-jdbc | Advisory build | 42.2.14-3.el8_9 | ALSA-2024:1435 |
| Alpine Linux | edge | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Debian | bullseye | libpgjava | Advisory build | 42.2.15-1+deb11u2 | DLA-3995-1 |
| Oracle Linux | 8 | postgresql-jdbcaarch64 | Advisory build | 0:42.2.14-3.el8_9 | ELSA-2024-1435 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcnoarch | Advisory build | 42.2.14-3.el8_9 | RHSA-2024:1435 |
Show 53 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-12-SP5 | postgresql-jdbcnoarch | Advisory build | 9.4-3.12.1 | SUSE-SU-2024:0771-1 |
| Rocky Linux | 8 | postgresql-jdbcnoarch | Listed in advisory | Not stated | RLSA-2024:1435 |
| AlmaLinux | 8 | postgresql-jdbc-javadoc | Advisory build | 42.2.14-3.el8_9 | ALSA-2024:1435 |
| AlmaLinux | 9 | postgresql-jdbc | Advisory build | 42.2.28-1.el9_3 | ALSA-2024:1436 |
| Alpine Linux | v3.19 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Alpine Linux | v3.20 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Alpine Linux | v3.21 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Alpine Linux | v3.22 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Alpine Linux | v3.23 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Alpine Linux | v3.24 | java-postgresql-jdbc | Fixed | 42.6.2-r0 | Package fix record |
| Debian | buster | libpgjava | Advisory build | 42.2.5-2+deb10u4 | DLA-3812-1 |
| Oracle Linux | 8 | postgresql-jdbcx86_64 | Advisory build | 0:42.2.14-3.el8_9 | ELSA-2024-1435 |
| Oracle Linux | 8 | postgresql-jdbc-javadocaarch64 | Advisory build | 0:42.2.14-3.el8_9 | ELSA-2024-1435 |
| Oracle Linux | 8 | postgresql-jdbc-javadocx86_64 | Advisory build | 0:42.2.14-3.el8_9 | ELSA-2024-1435 |
| Oracle Linux | 9 | postgresql-jdbcaarch64 | Advisory build | 0:42.2.28-1.el9_3 | ELSA-2024-1436 |
| Oracle Linux | 9 | postgresql-jdbcx86_64 | Advisory build | 0:42.2.28-1.el9_3 | ELSA-2024-1436 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcnoarch | Advisory build | 42.2.14-5.el8_8 | RHSA-2024:3313 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcnoarch | Advisory build | 42.2.3-5.el8_2 | RHSA-2024:2624 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcnoarch | Advisory build | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcnoarch | Advisory build | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcsrc | Advisory build | 42.2.14-3.el8_9 | RHSA-2024:1435 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcsrc | Advisory build | 42.2.14-5.el8_8 | RHSA-2024:3313 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcsrc | Advisory build | 42.2.3-5.el8_2 | RHSA-2024:2624 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcsrc | Advisory build | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbcsrc | Advisory build | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.14-3.el8_9 | RHSA-2024:1435 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.14-5.el8_8 | RHSA-2024:3313 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.3-5.el8_2 | RHSA-2024:2624 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.3-5.el8_6 | RHSA-2024:4402 |
| Red Hat Enterprise Linux | RHEL-8 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.3-7.el8_4 | RHSA-2024:4375 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcnoarch | Advisory build | 42.2.28-1.el9_0 | RHSA-2024:1999 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcnoarch | Advisory build | 42.2.28-1.el9_2 | RHSA-2024:1649 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcnoarch | Advisory build | 42.2.28-1.el9_3 | RHSA-2024:1436 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcsrc | Advisory build | 42.2.28-1.el9_0 | RHSA-2024:1999 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcsrc | Advisory build | 42.2.28-1.el9_2 | RHSA-2024:1649 |
| Red Hat Enterprise Linux | RHEL-9 | postgresql-jdbcsrc | Advisory build | 42.2.28-1.el9_3 | RHSA-2024:1436 |
| SUSE / openSUSE | SLE-15-SP3 | postgresql-jdbcnoarch | Advisory build | 42.2.25-150300.3.14.1 | SUSE-SU-2024:0769-1 |
| SUSE / openSUSE | SLE-15-SP4 | postgresql-jdbcnoarch | Advisory build | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE / openSUSE | SLE-15-SP5 | postgresql-jdbcnoarch | Advisory build | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE / openSUSE | openSUSE-Leap-15.5 | postgresql-jdbcnoarch | Advisory build | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE / openSUSE | openSUSE-Leap-15.5 | postgresql-jdbc-javadocnoarch | Advisory build | 42.2.25-150400.3.12.1 | SUSE-SU-2024:0773-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbcaarch64 | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbcppc64le | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbcs390x | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbcx86_64 | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbc-javadocaarch64 | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbc-javadocppc64le | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbc-javadocs390x | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | postgresql-jdbc-javadocx86_64 | Advisory build | 42.7.2-1.1 | OPENSUSE-SU-2024:13734-1 |
| Rocky Linux | 8 | postgresql-jdbcsrc | Listed in advisory | Not stated | RLSA-2024:1435 |
| Rocky Linux | 8 | postgresql-jdbc-javadocnoarch | Listed in advisory | Not stated | RLSA-2024:1435 |
| Rocky Linux | 9 | postgresql-jdbcnoarch | Listed in advisory | Not stated | RLSA-2024:1436 |
| Rocky Linux | 9 | postgresql-jdbcsrc | Listed in advisory | Not stated | RLSA-2024:1436 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 10.0 / 10
- Severity
- critical
- Provider
- PostgreSQL · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pgjdbc | pgjdbc | < 42.7.2 (affected)< 42.6.1 (affected)< 42.5.5 (affected)< 42.4.4 (affected)< 42.3.9 (affected)< 42.2.28 (affected) | PostgreSQL · cna |
| pgjdbc | pgjdbc | 0 to < 42.7.2 (affected · custom)0 to < 42.6.1 (affected · custom)0 to < 42.5.5 (affected · custom)0 to < 42.4.4 (affected · custom)0 to < 42.3.9 (affected · custom)0 to < 42.2.28 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
9- http://www.openwall.com/lists/oss-security/2024/04/02/6
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56
- https://lists.debian.org/debian-lts-announce/2024/05/msg00007.html
- https://lists.debian.org/debian-lts-announce/2024/12/msg00017.html
- https://lists.fedoraproject.org/archives/list/[email protected]/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU/
- https://security.netapp.com/advisory/ntap-20240419-0008/
- https://www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes/
- https://www.enterprisedb.com/docs/security/assessments/cve-2024-1597/
- https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/
Provider assertions
3PostgreSQL · cna
pgjdbc SQL Injection via line comment generation
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 52ebd63a4d530fe4ae6fa8d9dfec6bad4b60a59d677e8c28a1a9d065add6934e
- Ingested
- 23 Sep 2026, 08:18:22 UTC
- Source record
- Official CVE record