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
root.io logo minimus.io logo echo.ai logo

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

NameVendorStart VersionEnd Version
PostgresqlPostgresql12.0 (including)12.18 (excluding)
PostgresqlPostgresql13.0 (including)13.14 (excluding)
PostgresqlPostgresql14.0 (including)14.11 (excluding)
PostgresqlPostgresql15.0 (including)15.6 (excluding)
Red Hat Enterprise Linux 8RedHatpostgresql:10-8090020240213200157.a75119d5*
Red Hat Enterprise Linux 8RedHatpostgresql:15-8090020240209124629.a75119d5*
Red Hat Enterprise Linux 8RedHatpostgresql:12-8090020240209130909.a75119d5*
Red Hat Enterprise Linux 8RedHatpostgresql:13-8090020240209125046.a75119d5*
Red Hat Enterprise Linux 8.2 Advanced Update SupportRedHatpostgresql:12-8020020240214021628.4cda2c84*
Red Hat Enterprise Linux 8.2 Advanced Update SupportRedHatpostgresql:10-8020020240229083218.4cda2c84*
Red Hat Enterprise Linux 8.2 Telecommunications Update ServiceRedHatpostgresql:12-8020020240214021628.4cda2c84*
Red Hat Enterprise Linux 8.2 Telecommunications Update ServiceRedHatpostgresql:10-8020020240229083218.4cda2c84*
Red Hat Enterprise Linux 8.2 Update Services for SAP SolutionsRedHatpostgresql:12-8020020240214021628.4cda2c84*
Red Hat Enterprise Linux 8.2 Update Services for SAP SolutionsRedHatpostgresql:10-8020020240229083218.4cda2c84*
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRedHatpostgresql:12-8040020240214080556.522a0ee4*
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRedHatpostgresql:10-8040020240226112406.522a0ee4*
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRedHatpostgresql:13-8040020240222071300.522a0ee4*
Red Hat Enterprise Linux 8.4 Telecommunications Update ServiceRedHatpostgresql:12-8040020240214080556.522a0ee4*
Red Hat Enterprise Linux 8.4 Telecommunications Update ServiceRedHatpostgresql:10-8040020240226112406.522a0ee4*
Red Hat Enterprise Linux 8.4 Telecommunications Update ServiceRedHatpostgresql:13-8040020240222071300.522a0ee4*
Red Hat Enterprise Linux 8.4 Update Services for SAP SolutionsRedHatpostgresql:12-8040020240214080556.522a0ee4*
Red Hat Enterprise Linux 8.4 Update Services for SAP SolutionsRedHatpostgresql:10-8040020240226112406.522a0ee4*
Red Hat Enterprise Linux 8.4 Update Services for SAP SolutionsRedHatpostgresql:13-8040020240222071300.522a0ee4*
Red Hat Enterprise Linux 8.6 Extended Update SupportRedHatpostgresql:12-8060020240214083443.ad008a3a*
Red Hat Enterprise Linux 8.6 Extended Update SupportRedHatpostgresql:13-8060020240219120118.ad008a3a*
Red Hat Enterprise Linux 8.6 Extended Update SupportRedHatpostgresql:10-8060020240220155541.ad008a3a*
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatpostgresql:15-8080020240220104521.63b34585*
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatpostgresql:12-8080020240214025906.63b34585*
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatpostgresql:13-8080020240221110841.63b34585*
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatpostgresql:10-8080020240227061409.63b34585*
Red Hat Enterprise Linux 9RedHatpostgresql:15-9030020240209100638.rhel9*
Red Hat Enterprise Linux 9RedHatpostgresql-0:13.14-1.el9_3*
Red Hat Enterprise Linux 9.0 Extended Update SupportRedHatpostgresql-0:13.14-1.el9_0*
Red Hat Enterprise Linux 9.2 Extended Update SupportRedHatpostgresql-0:13.14-1.el9_2*
Red Hat Enterprise Linux 9.2 Extended Update SupportRedHatpostgresql:15-9020020240213145157.rhel9*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-postgresql13-postgresql-0:13.14-1.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-postgresql12-postgresql-0:12.18-1.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-postgresql10-postgresql-0:10.23-3.el7*
Postgresql-10Ubuntubionic*
Postgresql-10Ubuntuupstream*
Postgresql-12Ubuntuesm-infra/focal*
Postgresql-12Ubuntufocal*
Postgresql-12Ubuntutrusty*
Postgresql-12Ubuntuupstream*
Postgresql-14Ubuntujammy*
Postgresql-14Ubuntuupstream*
Postgresql-15Ubuntumantic*
Postgresql-15Ubuntuupstream*
Postgresql-16Ubuntunoble*
Postgresql-16Ubuntuoracular*
Postgresql-16Ubuntuupstream*
Postgresql-9.1Ubuntutrusty*
Postgresql-9.3Ubuntutrusty*
Postgresql-9.3Ubuntutrusty/esm*
Postgresql-9.3Ubuntuupstream*
Postgresql-9.5Ubuntuesm-infra/xenial*
Postgresql-9.5Ubuntuupstream*
Postgresql-9.5Ubuntuxenial*

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