Skip to content
Noroxi
NVD / CVE Program· CNA PostgreSQL

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

HighCVSS 8.0 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 33/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 1.8% (FIRST EPSS); higher than 78.9% of all records.
  • Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. A user must open a link or visit a page. No special conditions are required; it is repeatable.
  • Fixed version: n/a PostgreSQL 12.18, 13.14, 14.11.

Low priority for now. Upgrade to n/a PostgreSQL 12.18, 13.14, 14.11 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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.

Published
Feb 8, 2024
Updated
Jun 17, 2026
EPSS
1.8% · 78th percentile

Report tools

JSON

Action score

33

Monitor

Low priority for now.

CVSS
32 / 40 · 8.0 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 1.8%

CISA SSVC decision

Exploitation
none
Automatable
no
Technical impact
total

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
8.0
CNA · PostgreSQL
8.0
agree

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2024-0985

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Is PostgreSQL on your server exposed to the internet?Run a port scan

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Is PostgreSQL on your server exposed to the internet?Run a port scan

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
postgresqlpostgresql

Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)

Watch new CVEs for postgresql

When you'll hear from us

  • when a new CVE affecting this product is published
  • when a record in your stack enters KEV or is weaponized

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Is PostgreSQL on your server exposed to the internet?Run a port scan

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Is PostgreSQL on your server exposed to the internet?

The free port scanner finds the open ports on your server and matches the service versions it can read against known vulnerabilities. No account needed.

Run a port scan

Versions reported by the vendor

Affected version ranges reported by the assigning authority (PostgreSQL). Independent of NVD's CPE analysis and usually ahead of it.

  • n/a PostgreSQL

    • 16 and later · before 16.2affected · rpm
    • 15 and later · before 15.6affected · rpm
    • 14 and later · before 14.11affected · rpm
    • 13 and later · before 13.14affected · rpm
    • before 12.18affected · rpm

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:8pg_repackbefore 1.4.6-3.module_el8.6.0+2760+1746ec941.4.6-3.module_el8.6.0+2760+1746ec94
AlmaLinux:8pg_repackbefore 1.4.6-3.module_el8.9.0+3704+f1f917ce1.4.6-3.module_el8.9.0+3704+f1f917ce
AlmaLinux:8pg_repackbefore 1.4.6-3.module_el8.6.0+3095+ee60d9101.4.6-3.module_el8.6.0+3095+ee60d910
AlmaLinux:8pg_repackbefore 1.4.6-3.module_el8.6.0+3094+eb237fb81.4.6-3.module_el8.6.0+3094+eb237fb8
AlmaLinux:8pg_repackbefore 1.4.8-1.module_el8.8.0+3487+43ec1b9f1.4.8-1.module_el8.8.0+3487+43ec1b9f
AlmaLinux:8pg_repackbefore 1.4.6-3.module_el8.6.0+2758+4f4474df1.4.6-3.module_el8.6.0+2758+4f4474df
AlmaLinux:8pgauditbefore 1.7.0-1.module_el8.8.0+3487+43ec1b9f1.7.0-1.module_el8.8.0+3487+43ec1b9f
AlmaLinux:8pgauditbefore 1.5.0-1.module_el8.6.0+2760+1746ec941.5.0-1.module_el8.6.0+2760+1746ec94
AlmaLinux:8pgauditbefore 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.11.4.0-7.module_el8.9.0+3740+0e74851f.alma.1
AlmaLinux:8pgauditbefore 1.5.0-1.module_el8.6.0+3095+ee60d9101.5.0-1.module_el8.6.0+3095+ee60d910
AlmaLinux:8postgres-decoderbufsbefore 0.10.0-2.module_el8.6.0+2758+4f4474df0.10.0-2.module_el8.6.0+2758+4f4474df
AlmaLinux:8postgres-decoderbufsbefore 0.10.0-2.module_el8.6.0+3094+eb237fb80.10.0-2.module_el8.6.0+3094+eb237fb8
AlmaLinux:8postgres-decoderbufsbefore 0.10.0-2.module_el8.6.0+2760+1746ec940.10.0-2.module_el8.6.0+2760+1746ec94
AlmaLinux:8postgres-decoderbufsbefore 0.10.0-2.module_el8.9.0+3704+f1f917ce0.10.0-2.module_el8.9.0+3704+f1f917ce
AlmaLinux:8postgres-decoderbufsbefore 0.10.0-2.module_el8.6.0+3095+ee60d9100.10.0-2.module_el8.6.0+3095+ee60d910
AlmaLinux:8postgres-decoderbufsbefore 1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f1.9.7-1.Final.module_el8.8.0+3487+43ec1b9f
AlmaLinux:8postgresqlbefore 10.23-4.module_el8.9.0+3736+952d0ed7.alma.110.23-4.module_el8.9.0+3736+952d0ed7.alma.1
AlmaLinux:8postgresqlbefore 15.6-1.module_el8.9.0+3739+514705ed.alma.115.6-1.module_el8.9.0+3739+514705ed.alma.1
AlmaLinux:8postgresqlbefore 13.14-1.module_el8.9.0+3738+d55e2165.alma.113.14-1.module_el8.9.0+3738+d55e2165.alma.1
AlmaLinux:8postgresqlbefore 12.18-1.module_el8.9.0+3740+0e74851f.alma.112.18-1.module_el8.9.0+3740+0e74851f.alma.1
AlmaLinux:8postgresql-contribbefore 12.18-1.module_el8.9.0+3740+0e74851f.alma.112.18-1.module_el8.9.0+3740+0e74851f.alma.1
AlmaLinux:8postgresql-contribbefore 13.14-1.module_el8.9.0+3738+d55e2165.alma.113.14-1.module_el8.9.0+3738+d55e2165.alma.1
AlmaLinux:8postgresql-contribbefore 10.23-4.module_el8.9.0+3736+952d0ed7.alma.110.23-4.module_el8.9.0+3736+952d0ed7.alma.1
AlmaLinux:8postgresql-contribbefore 15.6-1.module_el8.9.0+3739+514705ed.alma.115.6-1.module_el8.9.0+3739+514705ed.alma.1

+96

Other highest-scoring records for the same primary product.

  • CVE-2017-7546PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allowing remote…
    57Plan
  • CVE-2019-9193In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_server_program' group to…
    55Plan
  • CVE-2020-25695A flaw was found in PostgreSQL versions before 13.1, before 12.5, before 11.10, before 10.15, before 9.6.20 and before 9.5.24.
    49Plan

Published before and after this one in the same product

  • ← EarlierCVE-2023-5869Dec 10, 2023 · Postgresql: buffer overrun from integer overflow in array modification
    36Monitor
  • ← EarlierCVE-2023-5870Dec 10, 2023 · Postgresql: role pg_signal_backend can signal certain superuser processes.
    18Monitor
  • Later →CVE-2024-4317May 14, 2024 · PostgreSQL pg_stats_ext and pg_stats_ext_exprs lack authorization checks
    17Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
n/a PostgreSQL12.18Vendor (CNA)
n/a PostgreSQL13.14Vendor (CNA)
n/a PostgreSQL14.11Vendor (CNA)
n/a PostgreSQL15.6Vendor (CNA)
n/a PostgreSQL16.2Vendor (CNA)
almalinux:pg_repack1.4.8-1.module_el9.2.0+22+09653793 · AlmaLinux:9Package registry (OSV)
almalinux:pgaudit1.7.0-1.module_el9.2.0+22+09653793 · AlmaLinux:9Package registry (OSV)
almalinux:postgres-decoderbufs1.9.7-1.Final.module_el9.2.0+22+09653793 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-contrib15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-docs15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-plperl15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-plpython315.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-pltcl15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-private-devel15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-private-libs15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-server15.6-1.module_el9.3.0+55+d62f4779 · AlmaLinux:9Package registry (OSV)
alpine:postgresql1212.18-r0 · Alpine:v3.16Package registry (OSV)
alpine:postgresql1313.14-r0 · Alpine:v3.16Package registry (OSV)
alpine:postgresql1414.11-r0 · Alpine:v3.16Package registry (OSV)
alpine:postgresql1515.6-r0 · Alpine:v3.17Package registry (OSV)
alpine:postgresql1616.2-r0 · Alpine:v3.19Package registry (OSV)
debian:postgresql-1111.22-0+deb10u2 · Debian:10Package registry (OSV)
debian:postgresql-1313.14-0+deb11u1 · Debian:11Package registry (OSV)
debian:postgresql-1515.6-0+deb12u1 · Debian:12Package registry (OSV)
opensuse:postgresql1212.18-150200.8.57.1 · openSUSE:Leap 15.5Package registry (OSV)
opensuse:postgresql1313.14-150200.5.53.1 · openSUSE:Leap 15.5Package registry (OSV)
opensuse:postgresql1414.11-150200.5.39.1 · openSUSE:Leap 15.5Package registry (OSV)
opensuse:postgresql1515.6-150200.5.22.1 · openSUSE:Leap 15.5Package registry (OSV)
opensuse:postgresql1616.2-150200.5.10.1 · openSUSE:Leap 15.5Package registry (OSV)

+26

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

Not on record for this CVE: EPSS history · patch commit or PR link · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • A user must open a link or visit a page.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

References

All records