Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS / 20.04 LTS / 22.04 LTS : libpgjava vulnerabilities (USN-9491-1)

critical Nessus Plugin ID 394242

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS / 20.04 LTS / 22.04 LTS host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-9491-1 advisory.

It was discovered that the PostgreSQL JDBC Driver did not properly verify that classes provided through certain connection properties implemented the expected interfaces before instantiating them. An attacker able to control the connection URL or properties could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2022-21724)

It was discovered that the PostgreSQL JDBC Driver did not properly escape column names in the ResultSet.refreshRow() method. An attacker could possibly use this issue to perform SQL injection and execute additional SQL commands. (CVE-2022-31197)

It was discovered that the PostgreSQL JDBC Driver created temporary files with insecure permissions when handling large input streams. A local attacker could possibly use this issue to obtain sensitive information.
This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2022-41946)

It was discovered that the PostgreSQL JDBC Driver did not properly handle certain query placeholders when using the simple query mode. An attacker could possibly use this issue to perform SQL injection and alter queries.
(CVE-2024-1597)

Tenable has extracted the preceding description block directly from the Ubuntu security advisory.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Update the affected libpg-java and / or libpostgresql-jdbc-java packages.

See Also

https://ubuntu.com/security/CVE-2022-21724

https://ubuntu.com/security/CVE-2022-31197

https://ubuntu.com/security/CVE-2022-41946

https://ubuntu.com/security/CVE-2024-1597

https://ubuntu.com/security/notices/USN-9491-1

Plugin Details

Severity: Critical

ID: 394242

File Name: ubuntu_USN-9491-1.nasl

Version: 1.1

Type: Local

Agent: unix

Published: 12/5/2026

Updated: 12/5/2026

Supported Sensors: Nessus Agent, Continuous Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 4.9

Percentile: 58.9

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-21724

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2024-1597

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:14.04:-:lts, cpe:/o:canonical:ubuntu_linux:16.04:-:lts, cpe:/o:canonical:ubuntu_linux:18.04:-:lts, cpe:/o:canonical:ubuntu_linux:20.04:-:lts, cpe:/o:canonical:ubuntu_linux:22.04:-:lts, cpe:/o:canonical:ubuntu_linux:pro:-:lts, p-cpe:/a:canonical:ubuntu_linux:libpg-java, p-cpe:/a:canonical:ubuntu_linux:libpostgresql-jdbc-java

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/3/2026

Vulnerability Publication Date: 2/2/2022

Reference Information

CVE: CVE-2022-21724, CVE-2022-31197, CVE-2022-41946, CVE-2024-1597

USN: 9491-1