GLSA-202211-04 : PostgreSQL: Multiple Vulnerabilities

high Nessus Plugin ID 168040

Description

The remote host is affected by the vulnerability described in GLSA-202211-04 (PostgreSQL: Multiple Vulnerabilities)

- When the server is configured to use trust authentication with a clientcert requirement or to use cert authentication, a man-in-the-middle attacker can inject arbitrary SQL queries when a connection is first established, despite the use of SSL certificate verification and encryption. (CVE-2021-23214)

- A man-in-the-middle attacker can inject false responses to the client's first few queries, despite the use of SSL certificate verification and encryption. (CVE-2021-23222)

- A flaw was found in postgresql in versions before 13.3, before 12.7, before 11.12, before 10.17 and before 9.6.22. While modifying certain SQL array values, missing bounds checks let authenticated database users write arbitrary bytes to a wide area of server memory. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability. (CVE-2021-32027)

- A flaw was found in postgresql. Using an INSERT ... ON CONFLICT ... DO UPDATE command on a purpose-crafted table, an authenticated database user could read arbitrary bytes of server memory. The highest threat from this vulnerability is to data confidentiality. (CVE-2021-32028)

- A flaw was found in postgresql. A purpose-crafted query can read arbitrary bytes of server memory. In the default configuration, any authenticated database user can complete this attack at will. The attack does not require the ability to create objects. If server settings include max_worker_processes=0, the known versions of this attack are infeasible. However, undiscovered variants of the attack may be independent of that setting. (CVE-2021-3677)

- A flaw was found in PostgreSQL. There is an issue with incomplete efforts to operate safely when a privileged user is maintaining another user's objects. The Autovacuum, REINDEX, CREATE INDEX, REFRESH MATERIALIZED VIEW, CLUSTER, and pg_amcheck commands activated relevant protections too late or not at all during the process. This flaw allows an attacker with permission to create non-temporary objects in at least one schema to execute arbitrary SQL functions under a superuser identity. (CVE-2022-1552)

- A vulnerability was found in PostgreSQL. This attack requires permission to create non-temporary objects in at least one schema, the ability to lure or wait for an administrator to create or update an affected extension in that schema, and the ability to lure or wait for a victim to use the object targeted in CREATE OR REPLACE or CREATE IF NOT EXISTS. Given all three prerequisites, this flaw allows an attacker to run arbitrary code as the victim role, which may be a superuser. (CVE-2022-2625)

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

Solution

All PostgreSQL 10.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-db/postgresql-10.22:10 All PostgreSQL 11.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-db/postgresql-11.17:11 All PostgreSQL 12.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-db/postgresql-12.12:12 All PostgreSQL 13.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-db/postgresql-13.8:13 All PostgreSQL 14.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-db/postgresql-14.5:14

See Also

https://security.gentoo.org/glsa/202211-04

https://bugs.gentoo.org/show_bug.cgi?id=793734

https://bugs.gentoo.org/show_bug.cgi?id=808984

https://bugs.gentoo.org/show_bug.cgi?id=823125

https://bugs.gentoo.org/show_bug.cgi?id=865255

Plugin Details

Severity: High

ID: 168040

File Name: gentoo_GLSA-202211-04.nasl

Version: 1.2

Type: local

Published: 11/22/2022

Updated: 11/22/2022

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 4.8

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

CVSS Score Source: CVE-2021-32027

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.7

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

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

CVSS Score Source: CVE-2022-1552

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:postgresql, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Ease: No known exploits are available

Patch Publication Date: 11/19/2022

Vulnerability Publication Date: 5/13/2021

Reference Information

CVE: CVE-2021-23214, CVE-2021-23222, CVE-2021-32027, CVE-2021-32028, CVE-2021-3677, CVE-2022-1552, CVE-2022-2625