PT-2024-1805 · Postgresql+9 · Pgjdbc+11

Paul-Gerste-Sonarsource

·

Published

2024-02-19

·

Updated

2026-02-13

·

CVE-2024-1597

CVSS v3.1

10

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions pgjdbc versions prior to 42.7.2 pgjdbc versions prior to 42.6.1 pgjdbc versions prior to 42.5.5 pgjdbc versions prior to 42.4.4 pgjdbc versions prior to 42.3.9 pgjdbc versions prior to 42.2.28
Description The PostgreSQL JDBC Driver has a SQL injection vulnerability when using the PreferQueryMode=SIMPLE connection property. This allows an attacker to inject SQL and alter queries, bypassing protections against SQL injection attacks. The vulnerability requires specific conditions to be met, including a placeholder for a numeric value immediately preceded by a minus and a second placeholder for a string value on the same line. Both parameters must be user-controlled. The vulnerability can be exploited to expose assets and has a high impact on confidentiality, integrity, and availability.
Recommendations To resolve the issue, upgrade pgjdbc to version 42.7.2 or later. For versions prior to 42.7.2, upgrade to version 42.6.1 or later. For versions prior to 42.6.1, upgrade to version 42.5.5 or later. For versions prior to 42.5.5, upgrade to version 42.4.4 or later. For versions prior to 42.4.4, upgrade to version 42.3.9 or later. For versions prior to 42.3.9, upgrade to version 42.2.28 or later. As a temporary workaround, consider disabling the PreferQueryMode=SIMPLE connection property until a patch is available.

Fix

SQL injection

Weakness Enumeration

Related Identifiers

ALSA-2024:1435
ALSA-2024:1436
ALT-PU-2024-16562
ALT-PU-2024-16782
ALT-PU-2024-17651
BDU:2024-01541
BIT-POSTGRESQL-JDBC-DRIVER-2024-1597
CESA-2024_1435
CVE-2024-1597
DLA-3812-1
DLA-3995-1
GHSA-24RP-Q3W6-VC56
GHSA-XFG6-62PX-CXC2
INFSA-2024_1435
INFSA-2024_1436
MGASA-2024-0120
OESA-2024-1237
OPENSUSE-SU-2024:13734-1
OPENSUSE-SU-2024_0769-1
RHSA-2024:1435
RHSA-2024:1436
RHSA-2024:1649
RHSA-2024:1999
RHSA-2024:2624
RHSA-2024:3313
RHSA-2024:4375
RHSA-2024:4402
RHSA-2024_1435
RHSA-2024_1436
RLSA-2024:1435
RLSA-2024:1436
SUSE-SU-2024:0769-1
SUSE-SU-2024:0771-1
SUSE-SU-2024:0773-1
SUSE-SU-2024_0769-1
SUSE-SU-2024_0771-1
SUSE-SU-2024_0773-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Bamboo
Centos
Confluence
Jira
Red Hat
Red Os
Rocky Linux
Suse
Pgjdbc