cve.bz

CVE-2024-0985 postgresql postgresql: Privilege Dropping / Lowering Errors

8.0 highEPSS 1.2%

High (8.0) in postgresql postgresql. EPSS 1.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.0 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
1.2% (down from 1.8% a week ago; 1.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 69th percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-02-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-271 Privilege Dropping / Lowering Errors
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-0985 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-0985?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-0985?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-0985 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
postgresql:postgresqlfrom 12.0 before 12.18
postgresql:postgresqlfrom 13.0 before 13.14
postgresql:postgresqlfrom 14.0 before 14.11
postgresql:postgresqlfrom 15.0 before 15.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10postgresql-1111.22-0+deb10u2DLA-3764-1
Debian11postgresql-1313.14-0+deb11u1DSA-5622-1
Debian12postgresql-1515.6-0+deb12u1DEBIAN-CVE-2024-0985 DSA-5623-1
Ubuntu20.04:LTSpostgresql-1212.18-0ubuntu0.20.04.1UBUNTU-CVE-2024-0985 USN-6656-1
Ubuntu22.04:LTSpostgresql-1414.11-0ubuntu0.22.04.1UBUNTU-CVE-2024-0985 USN-6656-1
Ubuntu24.04:LTSpostgresql-1616.2-1UBUNTU-CVE-2024-0985
UbuntuPro:14.04:LTSpostgresql-9.3no fix listedUBUNTU-CVE-2024-0985
UbuntuPro:16.04:LTSpostgresql-9.59.5.25-0ubuntu0.16.04.1+esm7UBUNTU-CVE-2024-0985 USN-6656-2
UbuntuPro:18.04:LTSpostgresql-10no fix listedUBUNTU-CVE-2024-0985
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+19330+c97ddbdfRHSA-2024:0974
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+20664+9c30cf7fRHSA-2024:0975
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2024:0973
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.4.0-7.module+el8.9.0+21289+7c796f9dRHSA-2024:0974
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2024:0975
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.7.0-1.module+el8.9.0+19797+c4ce5969RHSA-2024:0973
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+19330+c97ddbdfRHSA-2024:0974
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+20664+9c30cf7fRHSA-2024:0975
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969RHSA-2024:0973
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 25 more0:15.6-1.module+el8.9.0+21287+d0eecfe6RHSA-2024:0973
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:10.23-4.module+el8.9.0+21317+d2c6bf8aRHSA-2024:0956
Red Hatenterprise_linux:8::appstreampostgresql, postgresql-docs, postgresql-test and 22 more0:12.18-1.module+el8.9.0+21289+7c796f9dRHSA-2024:0974
51 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 13 morepostgresql1616.2-150200.5.10.1SUSE-SU-2024:0550-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 12 morepostgresql1414.11-150200.5.39.1SUSE-SU-2024:0552-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 8 morepostgresql1313.14-150200.5.53.1SUSE-SU-2024:0522-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 4 morepostgresql1212.18-150200.8.57.1SUSE-SU-2024:0523-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morepostgresql1515.6-150200.5.22.1SUSE-SU-2024:0551-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1212.18-3.52.1SUSE-SU-2024:0542-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1313.14-3.46.1SUSE-SU-2024:0541-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1414.11-3.36.1SUSE-SU-2024:0540-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1515.6-3.22.1SUSE-SU-2024:0520-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1616.2-3.10.1SUSE-SU-2024:0546-1
openSUSELeap 15.5postgresql1212.18-150200.8.57.1SUSE-SU-2024:0523-1
openSUSELeap 15.5postgresql1313.14-150200.5.53.1SUSE-SU-2024:0522-1
openSUSELeap 15.5postgresql1414.11-150200.5.39.1SUSE-SU-2024:0552-1
openSUSELeap 15.5postgresql1515.6-150200.5.22.1SUSE-SU-2024:0551-1
openSUSELeap 15.5postgresql16, postgresql16-mini16.2-150200.5.10.1SUSE-SU-2024:0550-1
openSUSETumbleweedpostgresql1212.18-1.1openSUSE-SU-2024:13668-1
openSUSETumbleweedpostgresql1313.14-1.1openSUSE-SU-2024:13669-1
openSUSETumbleweedpostgresql1414.11-1.1openSUSE-SU-2024:13670-1
openSUSETumbleweedpostgresql1515.6-1.1openSUSE-SU-2024:13671-1
openSUSETumbleweedpostgresql1616.2-1.1openSUSE-SU-2024:13672-1
openSUSETumbleweedpostgresql1717.6-2.1openSUSE-SU-2025:15580-1
openSUSETumbleweedpostgresql1818.7-1.1openSUSE-SU-2026:12654-1
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+2758+4f4474dfALSA-2024:0974
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2024:0975
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+3094+eb237fb8ALSA-2024:0974
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2024:0975
AlmaLinux8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2024:0974
AlmaLinux8pg_repack1.4.8-1.module_el8.8.0+3487+43ec1b9fALSA-2024:0973
AlmaLinux8pgaudit1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1ALSA-2024:0974
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2024:0975
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2024:0975
AlmaLinux8pgaudit1.7.0-1.module_el8.8.0+3487+43ec1b9fALSA-2024:0973
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2758+4f4474dfALSA-2024:0974
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2024:0975
13 more for AlmaLinux in the JSON.
Rocky Linux8pg_repack0:1.4.6-3.module+el8.10.0+1862+29bef648RLSA-2024:0974 RLSA-2024:0975
Rocky Linux8pg_repack0:1.4.6-3.module+el8.9.0+1594+4a6adae9RLSA-2024:0974 RLSA-2024:0975
Rocky Linux8pg_repack0:1.4.6-3.module+el8.9.0+1603+444d1b54RLSA-2024:0974 RLSA-2024:0975
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2024:0973
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2024:0973
Rocky Linux8pg_repack0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2024:0973
Rocky Linux8pgaudit0:1.4.0-7.module+el8.9.0+1735+a332307bRLSA-2024:0974
Rocky Linux8pgaudit0:1.5.0-1.module+el8.9.0+1594+4a6adae9RLSA-2024:0975
Rocky Linux8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2024:0973
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.10.0+1862+29bef648RLSA-2024:0974 RLSA-2024:0975
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.9.0+1594+4a6adae9RLSA-2024:0974 RLSA-2024:0975
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.9.0+1603+444d1b54RLSA-2024:0974 RLSA-2024:0975
8 more for Rocky Linux in the JSON.
Alpinev3.16, v3.17, v3.18postgresql1212.18-r0ALPINE-CVE-2024-0985
Alpinev3.16, v3.17, v3.18 and 1 morepostgresql1313.14-r0ALPINE-CVE-2024-0985
Alpinev3.16, v3.17, v3.18 and 2 morepostgresql1414.11-r0ALPINE-CVE-2024-0985
Alpinev3.17, v3.18, v3.19 and 3 morepostgresql1515.6-r0ALPINE-CVE-2024-0985
Alpinev3.19, v3.20, v3.21 and 3 morepostgresql1616.2-r0ALPINE-CVE-2024-0985
Azure Linux2postgresql14.11-1AZL-34279
Azure Linux3postgresql16.3-1AZL-35111
Alpaquita23postgresql1515.6-r0BELL-CVE-2024-0985
Alpaquitastreampostgresql1616.2-r0BELL-CVE-2024-0985

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This PostgreSQL vulnerability poses a significant risk due to its potential for unauthorized access and manipulation of data. Essentially, it allows attackers to execute arbitrary SQL functions using the REFRESH MATERIALIZED VIEW CONCURRENTLY command, especially when the victim is a superuser or holds a role within the attacker's control. By luring victims into running this command on a maliciously crafted materialized view, attackers can exploit the system. This could lead to serious consequences, such as data breaches or data corruption, compromising the integrity and confidentiality of the database.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8postgresql:10-8090020240213200157.a75119d5Fixed 2024-02-26RHSA-2024:0956
Red Hat Enterprise Linux 8postgresql:15-8090020240209124629.a75119d5Fixed 2024-02-26RHSA-2024:0973
Red Hat Enterprise Linux 8postgresql:12-8090020240209130909.a75119d5Fixed 2024-02-26RHSA-2024:0974
Red Hat Enterprise Linux 8postgresql:13-8090020240209125046.a75119d5Fixed 2024-02-26RHSA-2024:0975
Red Hat Enterprise Linux 8.2 Advanced Update Supportpostgresql:12-8020020240214021628.4cda2c84Fixed 2024-03-04RHSA-2024:1071
Red Hat Enterprise Linux 8.2 Advanced Update Supportpostgresql:10-8020020240229083218.4cda2c84Fixed 2024-03-19RHSA-2024:1422
Red Hat Enterprise Linux 8.2 Telecommunications Update Servicepostgresql:12-8020020240214021628.4cda2c84Fixed 2024-03-04RHSA-2024:1071
Red Hat Enterprise Linux 8.2 Telecommunications Update Servicepostgresql:10-8020020240229083218.4cda2c84Fixed 2024-03-19RHSA-2024:1422
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutionspostgresql:12-8020020240214021628.4cda2c84Fixed 2024-03-04RHSA-2024:1071
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutionspostgresql:10-8020020240229083218.4cda2c84Fixed 2024-03-19RHSA-2024:1422
OpenShift ServerlesspostgresqlNot affected
Red Hat build of Apicurio Registry 2postgresqlNot affected
Red Hat build of Debezium 2postgresqlNot affected
Red Hat build of OptaPlanner 8postgresqlNot affected
Red Hat Data Grid 8postgresqlNot affected
Red Hat Enterprise Linux 6postgresqlOut of support scope
Red Hat Enterprise Linux 7postgresqlNot affected
Red Hat Enterprise Linux 8postgresql:16/postgresqlNot affected
Red Hat Enterprise Linux 9postgresql:16/postgresqlNot affected
Red Hat Fuse 7postgresqlNot affected
25 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-0985.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-120-06ABB Ability Symphony Plus Engineering2026-04-13Chemical, Critical Manufacturing, Energy, Water and Wastewater, Water and WastewaterABB Ability Symphony Plus S+ Engineering 2.2, ABB Ability Symphony Plus S+ Engineering 2.3, ABB Ability Symphony Plus S+ Engineering 2.3 RU1 and 5 moreABB Ability Symphony Plus S+ Engineering 2.4 SP2 RU1
ICSA-24-228-06Siemens SINEC NMS2024-08-13MultipleSINEC NMSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON