Rapid7 Vulnerability & Exploit Database

Red Hat: CVE-2024-0985: postgresql: non-owner 'REFRESH MATERIALIZED VIEW CONCURRENTLY' executes arbitrary SQL (Multiple Advisories)

Free InsightVM Trial No Credit Card Necessary
Watch Demo See how it all works
Back to Search

Red Hat: CVE-2024-0985: postgresql: non-owner 'REFRESH MATERIALIZED VIEW CONCURRENTLY' executes arbitrary SQL (Multiple Advisories)

Severity
9
CVSS
(AV:N/AC:L/Au:S/C:C/I:C/A:C)
Published
02/08/2024
Created
02/24/2024
Added
02/23/2024
Modified
03/20/2024

Description

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 attacker's roles. The attack requires luring the victim into running REFRESH MATERIALIZED VIEW CONCURRENTLY on the attacker's materialized view. As part of exploiting this vulnerability, the attacker creates functions that use CREATE RULE to convert the internally-built temporary table to a view. Versions before PostgreSQL 15.6, 14.11, 13.14, and 12.18 are affected. The only known exploit does not work in PostgreSQL 16 and later. For defense in depth, PostgreSQL 16.2 adds the protections that older branches are using to fix their vulnerability.

Solution(s)

  • redhat-upgrade-pg_repack
  • redhat-upgrade-pg_repack-debuginfo
  • redhat-upgrade-pg_repack-debugsource
  • redhat-upgrade-pgaudit
  • redhat-upgrade-pgaudit-debuginfo
  • redhat-upgrade-pgaudit-debugsource
  • redhat-upgrade-postgres-decoderbufs
  • redhat-upgrade-postgres-decoderbufs-debuginfo
  • redhat-upgrade-postgres-decoderbufs-debugsource
  • redhat-upgrade-postgresql
  • redhat-upgrade-postgresql-contrib
  • redhat-upgrade-postgresql-contrib-debuginfo
  • redhat-upgrade-postgresql-debuginfo
  • redhat-upgrade-postgresql-debugsource
  • redhat-upgrade-postgresql-docs
  • redhat-upgrade-postgresql-docs-debuginfo
  • redhat-upgrade-postgresql-plperl
  • redhat-upgrade-postgresql-plperl-debuginfo
  • redhat-upgrade-postgresql-plpython3
  • redhat-upgrade-postgresql-plpython3-debuginfo
  • redhat-upgrade-postgresql-pltcl
  • redhat-upgrade-postgresql-pltcl-debuginfo
  • redhat-upgrade-postgresql-private-devel
  • redhat-upgrade-postgresql-private-libs
  • redhat-upgrade-postgresql-private-libs-debuginfo
  • redhat-upgrade-postgresql-server
  • redhat-upgrade-postgresql-server-debuginfo
  • redhat-upgrade-postgresql-server-devel
  • redhat-upgrade-postgresql-server-devel-debuginfo
  • redhat-upgrade-postgresql-static
  • redhat-upgrade-postgresql-test
  • redhat-upgrade-postgresql-test-debuginfo
  • redhat-upgrade-postgresql-test-rpm-macros
  • redhat-upgrade-postgresql-upgrade
  • redhat-upgrade-postgresql-upgrade-debuginfo
  • redhat-upgrade-postgresql-upgrade-devel
  • redhat-upgrade-postgresql-upgrade-devel-debuginfo

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center

;