CVE Vulnerabilities

CVE-2024-0985

Privilege Dropping / Lowering Errors

Published: Feb 08, 2024 | Modified: Dec 20, 2024
CVSS 3.x
8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
8 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

Late privilege drop in REFRESH MATERIALIZED VIEW CONCURRENTLY in PostgreSQL allows an object creator to execute arbitrary SQL functions as the command issuer. The command intends to run SQL functions as the owner of the materialized view, enabling safe refresh of untrusted materialized views. The victim is a superuser or member of one of the attackers roles. The attack requires luring the victim into running REFRESH MATERIALIZED VIEW CONCURRENTLY on the attackers materialized view. Versions before PostgreSQL 16.2, 15.6, 14.11, 13.14, and 12.18 are affected.

Weakness

The product does not drop privileges before passing control of a resource to an actor that does not have those privileges.

Affected Software

Name Vendor Start Version End Version
Postgresql Postgresql 12.0 (including) 12.18 (excluding)
Postgresql Postgresql 13.0 (including) 13.14 (excluding)
Postgresql Postgresql 14.0 (including) 14.11 (excluding)
Postgresql Postgresql 15.0 (including) 15.6 (excluding)
Postgresql-10 Ubuntu bionic *
Postgresql-12 Ubuntu focal *
Postgresql-12 Ubuntu trusty *
Postgresql-12 Ubuntu upstream *
Postgresql-14 Ubuntu jammy *
Postgresql-14 Ubuntu upstream *
Postgresql-15 Ubuntu mantic *
Postgresql-15 Ubuntu upstream *
Postgresql-16 Ubuntu devel *
Postgresql-16 Ubuntu noble *
Postgresql-16 Ubuntu oracular *
Postgresql-16 Ubuntu upstream *
Postgresql-9.1 Ubuntu trusty *
Postgresql-9.3 Ubuntu trusty *
Postgresql-9.3 Ubuntu trusty/esm *
Postgresql-9.5 Ubuntu esm-infra/xenial *
Postgresql-9.5 Ubuntu xenial *
Red Hat Enterprise Linux 8 RedHat postgresql:10-8090020240213200157.a75119d5 *
Red Hat Enterprise Linux 8 RedHat postgresql:15-8090020240209124629.a75119d5 *
Red Hat Enterprise Linux 8 RedHat postgresql:12-8090020240209130909.a75119d5 *
Red Hat Enterprise Linux 8 RedHat postgresql:13-8090020240209125046.a75119d5 *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat postgresql:12-8020020240214021628.4cda2c84 *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat postgresql:10-8020020240229083218.4cda2c84 *
Red Hat Enterprise Linux 8.2 Telecommunications Update Service RedHat postgresql:12-8020020240214021628.4cda2c84 *
Red Hat Enterprise Linux 8.2 Telecommunications Update Service RedHat postgresql:10-8020020240229083218.4cda2c84 *
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions RedHat postgresql:12-8020020240214021628.4cda2c84 *
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions RedHat postgresql:10-8020020240229083218.4cda2c84 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:12-8040020240214080556.522a0ee4 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:10-8040020240226112406.522a0ee4 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:13-8040020240222071300.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:12-8040020240214080556.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:10-8040020240226112406.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:13-8040020240222071300.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:12-8040020240214080556.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:10-8040020240226112406.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:13-8040020240222071300.522a0ee4 *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat postgresql:12-8060020240214083443.ad008a3a *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat postgresql:13-8060020240219120118.ad008a3a *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat postgresql:10-8060020240220155541.ad008a3a *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:15-8080020240220104521.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:12-8080020240214025906.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:13-8080020240221110841.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:10-8080020240227061409.63b34585 *
Red Hat Enterprise Linux 9 RedHat postgresql:15-9030020240209100638.rhel9 *
Red Hat Enterprise Linux 9 RedHat postgresql-0:13.14-1.el9_3 *
Red Hat Enterprise Linux 9.0 Extended Update Support RedHat postgresql-0:13.14-1.el9_0 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat postgresql-0:13.14-1.el9_2 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat postgresql:15-9020020240213145157.rhel9 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-postgresql13-postgresql-0:13.14-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-postgresql12-postgresql-0:12.18-1.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-postgresql10-postgresql-0:10.23-3.el7 *

Potential Mitigations

  • Compartmentalize the system to have “safe” areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area.
  • Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References