Skip to content
CVE Ledger
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API docsPage
  • MCP serverPage
  • AboutPage
  • Data sourcesPage
  • Data statusPage
  • ChangelogPage
  • How it's builtPage
  • Support the projectPage

14 results

Back

CVE-2024-0985PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL

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

Timeline

  1. ID reserved

    By PostgreSQL

  2. · 12 days later

    Published

  3. · 16 months later

    Record updated

Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.

Scores

CVSS scores of CVE-2024-0985, by who scored it
Scored byCVSSScoreVector
PostgreSQLCNA (assigner)3.1High8.0CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
NVDNVD · Modified3.1High8.0CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
1.8% · top 21% of all CVEs (19 Nov 2026)
CISA SSVC
Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.0.

Affected products

  • PostgreSQL

    • affected 16 – < 16.2
    • affected 15 – < 15.6
    • affected 14 – < 14.11
    • affected 13 – < 13.14
    • affected < 12.18

What to do

Workaround: Use REFRESH MATERIALIZED VIEW without CONCURRENTLY.

Workaround: In a new database connection, authenticate as the materialized view owner.

References

References4

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2024-0985 badge
[![CVE-2024-0985](https://cveledger.app/badge/CVE-2024-0985.svg)](https://cveledger.app/cve/CVE-2024-0985)

Record last updated .