Skip to content
Fencer Vulns
high 8.0

CVE-2024-0985 json

PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL

published 2024-02-08 2 y ago modified 2026-09-08 2 mo ago also BIT-postgresql-2024-0985 , EUVD-2024-16762 , JLSEC-2026-46

cvss
8.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.8%
EPSS 1.8% chance of exploitation in 30 days, percentile 78%
public exploits
0
none known

Summary

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. Versions before PostgreSQL 16.2, 15.6, 14.11, 13.14, and 12.18 are affected.

Patch / fix

  • bitnami postgresql 12.18.0, 13.14.0, 14.11.0, 15.6.0
  • julia LibPQ_jll 16.0.0+0
  • n/a PostgreSQL 12.18, 13.14, 14.11, 15.6, 16.2
  • postgresql-15 Debian 12 15.6-0+deb12u1

debian advisories DEBIAN-CVE-2024-0985

  • postgresql-12 Ubuntu 20.04 LTS 12.18-0ubuntu0.20.04.1
  • postgresql-14 Ubuntu 22.04 LTS 14.11-0ubuntu0.22.04.1
  • postgresql-16 Ubuntu 24.04 LTS 16.2-1
  • postgresql-9.5 Ubuntu Pro 16.04 LTS 9.5.25-0ubuntu0.16.04.1+esm7

ubuntu advisories UBUNTU-CVE-2024-0985

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • pgaudit RHEL 9, RHEL 9.2 EUS 1.7.0-1.module+el9.2.0+17405+aeb9ec60
  • pg_repack RHEL 9, RHEL 9.2 EUS 1.4.8-1.module+el9.2.0+17405+aeb9ec60
  • postgres-decoderbufs RHEL 9, RHEL 9.2 EUS 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60
  • pgaudit RHEL 8 1.5.0-1.module+el8.9.0+20664+9c30cf7f
  • pg_repack RHEL 8 1.4.6-3.module+el8.9.0+20664+9c30cf7f
  • postgresql RHEL 8 13.14-1.module+el8.9.0+21288+3d364c44
  • postgresql-test RHEL 8 13.14-1.module+el8.9.0+21288+3d364c44
  • postgresql-pltcl RHEL 8 13.14-1.module+el8.9.0+21288+3d364c44

red hat advisories RHSA-2024:1426RHSA-2024:1315RHSA-2024:1437RHSA-2024:1422RHSA-2024:1314RHSA-2024:1429

  • postgresql14 SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +13 more 14.11-150200.5.39.1
  • postgresql15 SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES 15 SP4-LTSS +10 more 15.6-150200.5.22.1
  • postgresql16 SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +14 more 16.2-150200.5.10.1
  • postgresql16-mini openSUSE Leap 15.5 16.2-150200.5.10.1
  • postgresql16 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 16.2-3.10.1
  • postgresql12 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 12.18-3.52.1
  • postgresql13 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 13.14-3.46.1
  • postgresql14 SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 14.11-3.36.1

suse advisories SUSE-SU-2024:0552-1SUSE-SU-2024:0551-1SUSE-SU-2024:0550-1SUSE-SU-2024:0546-1SUSE-SU-2024:0542-1SUSE-SU-2024:0541-1

  • postgresql17 openSUSE Tumbleweed 17.6-2.1
  • postgresql12 openSUSE Tumbleweed 12.18-1.1
  • postgresql13 openSUSE Tumbleweed 13.14-1.1
  • postgresql14 openSUSE Tumbleweed 14.11-1.1
  • postgresql15 openSUSE Tumbleweed 15.6-1.1
  • postgresql16 openSUSE Tumbleweed 16.2-1.1

opensuse advisories openSUSE-SU-2025:15580-1openSUSE-SU-2024:13668-1openSUSE-SU-2024:13669-1openSUSE-SU-2024:13670-1openSUSE-SU-2024:13671-1openSUSE-SU-2024:13672-1

  • postgresql AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-test AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-pltcl AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-plperl AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-server AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-contrib AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-upgrade AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1
  • postgresql-plpython3 AlmaLinux 8 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1

almalinux advisories ALSA-2024:0956ALSA-2024:0973ALSA-2024:0974ALSA-2024:0975ALSA-2024:0950ALSA-2024:0951

  • pgaudit Rocky Linux 8 1.4.0-7.module+el8.9.0+1735+a332307b
  • pg_repack Rocky Linux 8 1.4.6-3.module+el8.10.0+1862+29bef648
  • pg_repack Rocky Linux 8 1.4.6-3.module+el8.9.0+1594+4a6adae9
  • pg_repack Rocky Linux 8 1.4.6-3.module+el8.9.0+1603+444d1b54
  • postgresql Rocky Linux 8 12.18-1.module+el8.9.0+1735+a332307b
  • postgres-decoderbufs Rocky Linux 8 0.10.0-2.module+el8.10.0+1862+29bef648
  • postgres-decoderbufs Rocky Linux 8 0.10.0-2.module+el8.9.0+1594+4a6adae9
  • postgres-decoderbufs Rocky Linux 8 0.10.0-2.module+el8.9.0+1603+444d1b54

rocky linux advisories RLSA-2024:0974RLSA-2024:0951RLSA-2024:0950RLSA-2024:0973RLSA-2024:0975RLSA-2024:0956

  • postgresql12 Alpine 3.18, Alpine 3.17, Alpine 3.16 12.18-r0
  • postgresql13 Alpine 3.19, Alpine 3.18, Alpine 3.17 +1 more 13.14-r0
  • postgresql14 Alpine 3.20, Alpine 3.19, Alpine 3.18 +2 more 14.11-r0
  • postgresql15 Alpine 3.22, Alpine 3.21, Alpine 3.20 +3 more 15.6-r0
  • postgresql16 Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 16.2-r0

alpine advisories ALPINE-CVE-2024-0985

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • postgresql CBL-Mariner 2.0 14.11-1
  • postgresql Azure Linux 3.0 16.3-1

azure linux advisories AZL-34279AZL-35111

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-0985 updated cvss 8.0

postgresql: non-owner 'REFRESH MATERIALIZED VIEW CONCURRENTLY' executes arbitrary SQL

  • Red Hat Enterprise Linux 6 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +2 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat CodeReady Linux Builder (v. 9) postgresql-test 13.14-1.el9_3
    fixed: vendor fix RHSA-2024:0951
  • Red Hat CodeReady Linux Builder EUS (v.9.0) postgresql-test 13.14-1.el9_0
    fixed: vendor fix RHSA-2024:1240
  • Red Hat CodeReady Linux Builder EUS (v.9.2) postgresql-test 13.14-1.el9_2
    fixed: vendor fix RHSA-2024:1241
  • Red Hat Enterprise Linux AppStream (v. 8) pgaudit 1.4.0-7.module+el8.9.0+21289+7c796f9d, pgaudit 1.5.0-1.module+el8.9.0+20664+9c30cf7f, pgaudit 1.7.0-1.module+el8.9.0+19797+c4ce5969, pg_repack 1.4.6-3.module+el8.9.0+19330+c97ddbdf, pg_repack 1.4.6-3.module+el8.9.0+20664+9c30cf7f, pg_repack 1.4.8-1.module+el8.9.0+19797+c4ce5969, +40 more
    fixed: vendor fix RHSA-2024:0974
  • Red Hat Enterprise Linux AppStream (v. 9) postgresql 13.14-1.el9_3, postgresql-pltcl 13.14-1.el9_3, postgresql-plperl 13.14-1.el9_3, postgresql-server 13.14-1.el9_3, postgresql-contrib 13.14-1.el9_3, postgresql-upgrade 13.14-1.el9_3, +15 more
    fixed: vendor fix RHSA-2024:0950
  • Red Hat Enterprise Linux AppStream AUS (v. 8.2) pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661, postgresql 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-test 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql-test 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-pltcl 10.21-4.module+el8.2.0+21384+f73fb27d, +14 more
    fixed: vendor fix RHSA-2024:1071
  • Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7, postgresql 10.21-4.module+el8.4.0+21369+5e83297f, postgresql 12.18-1.module+el8.4.0+21322+132bf396, postgresql 13.14-1.module+el8.4.0+21351+d20df3d1, postgresql-test 10.21-4.module+el8.4.0+21369+5e83297f, +25 more
    fixed: vendor fix RHSA-2024:1195
show 10 more
  • Red Hat Enterprise Linux AppStream E4S (v. 8.2) pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661, postgresql 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-test 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql-test 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-pltcl 10.21-4.module+el8.2.0+21384+f73fb27d, +14 more
    fixed: vendor fix RHSA-2024:1071
  • Red Hat Enterprise Linux AppStream E4S (v.8.4) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7, postgresql 10.21-4.module+el8.4.0+21369+5e83297f, postgresql 12.18-1.module+el8.4.0+21322+132bf396, postgresql 13.14-1.module+el8.4.0+21351+d20df3d1, postgresql-test 10.21-4.module+el8.4.0+21369+5e83297f, +25 more
    fixed: vendor fix RHSA-2024:1195
  • Red Hat Enterprise Linux AppStream EUS (v.8.6) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, postgresql 10.21-4.module+el8.6.0+21345+167dd12c, postgresql 12.18-1.module+el8.6.0+21323+9f40792e, +27 more
    fixed: vendor fix RHSA-2024:1070
  • Red Hat Enterprise Linux AppStream EUS (v.8.8) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5, pgaudit 1.7.0-1.module+el8.8.0+17071+aaaceaa4, pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5, pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552, pg_repack 1.4.8-1.module+el8.8.0+17071+aaaceaa4, +40 more
    fixed: vendor fix RHSA-2024:1069
  • Red Hat Enterprise Linux AppStream EUS (v.9.0) postgresql 13.14-1.el9_0, postgresql-pltcl 13.14-1.el9_0, postgresql-plperl 13.14-1.el9_0, postgresql-server 13.14-1.el9_0, postgresql-contrib 13.14-1.el9_0, postgresql-upgrade 13.14-1.el9_0, +2 more
    fixed: vendor fix RHSA-2024:1240
  • Red Hat Enterprise Linux AppStream EUS (v.9.2) postgresql 13.14-1.el9_2, postgresql-pltcl 13.14-1.el9_2, postgresql-plperl 13.14-1.el9_2, postgresql-server 13.14-1.el9_2, postgresql-contrib 13.14-1.el9_2, postgresql-upgrade 13.14-1.el9_2, +15 more
    fixed: vendor fix RHSA-2024:1314
  • Red Hat Enterprise Linux AppStream TUS (v. 8.2) pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661, postgresql 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-test 10.21-4.module+el8.2.0+21384+f73fb27d, postgresql-test 12.18-1.module+el8.2.0+21319+75817bd0, postgresql-pltcl 10.21-4.module+el8.2.0+21384+f73fb27d, +14 more
    fixed: vendor fix RHSA-2024:1071
  • Red Hat Enterprise Linux AppStream TUS (v.8.4) pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a, pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7, postgresql 10.21-4.module+el8.4.0+21369+5e83297f, postgresql 12.18-1.module+el8.4.0+21322+132bf396, postgresql 13.14-1.module+el8.4.0+21351+d20df3d1, postgresql-test 10.21-4.module+el8.4.0+21369+5e83297f, +25 more
    fixed: vendor fix RHSA-2024:1195
  • Red Hat Software Collections for RHEL Workstation(v. 7) rh-postgresql10-postgresql 10.23-3.el7, rh-postgresql12-postgresql 12.18-1.el7, rh-postgresql13-postgresql 13.14-1.el7, rh-postgresql10-postgresql-libs 10.23-3.el7, rh-postgresql10-postgresql-test 10.23-3.el7, rh-postgresql12-postgresql-libs 12.18-1.el7, +28 more Red Hat Software Collections for RHEL(v. 7) rh-postgresql10-postgresql 10.23-3.el7, rh-postgresql12-postgresql 12.18-1.el7, rh-postgresql13-postgresql 13.14-1.el7, rh-postgresql10-postgresql-libs 10.23-3.el7, rh-postgresql10-postgresql-test 10.23-3.el7, rh-postgresql12-postgresql-libs 12.18-1.el7, +28 more
    fixed: vendor fix RHSA-2024:0992
  • Red Hat OpenShift Serverless postgresql Red Hat build of Apicurio Registry 2 postgresql Red Hat build of Debezium 2 postgresql Red Hat build of OptaPlanner 8 postgresql Red Hat Data Grid 8 postgresql Red Hat Enterprise Linux 7 postgresql, postgresql-libs, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, +3 more
    +4 more products
    Red Hat Enterprise Linux 8 pgaudit, pg_repack, postgresql, postgresql-test, postgresql-pltcl, postgresql-plperl, +7 more Red Hat Enterprise Linux 9 postgresql, postgresql-test, postgresql-pltcl, postgresql-plperl, postgresql-server, postgresql-contrib, +4 more Red Hat Fuse 7 postgresql Red Hat JBoss Data Grid 7 postgresql
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

cisa ICSA-26-120-06 updated cvss 8.0

ABB Ability Symphony Plus Engineering

  • ABB S+ Engineering 2.2, 2.3, 2.3_RU1, 2.3_RU2
    affected: vendor fix, workaround, mitigation
  • ABB S+ Engineering 2.4_SP2_RU1
    fixed

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

1.81% chance of exploitation in the next 30 days, higher than 78% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.0 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
NVD 3.1 8.0 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
OSV 3.1 8.0 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
bitnami postgresql
>=12.0.0, <12.18.0
>=13.0.0, <13.14.0
>=14.0.0, <14.11.0
>=15.0.0, <15.6.0
12.18.0
13.14.0
14.11.0
15.6.0
julia LibPQ_jll
<16.0.0+0
16.0.0+0

Affected products

  • n/a PostgreSQL

Classification

Weakness
  • CWE-271 Privilege Dropping / Lowering Errors
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.