Skip to content
Noroxi
NVD / CVE Program· CNA PostgreSQL

CVE-2024-10978: PostgreSQL SET ROLE, SET SESSION AUTHORIZATION reset to wrong user ID

MediumCVSS 4.2 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 16/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: 0.69% (FIRST EPSS); higher than 53.2% of all records.
  • Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. Special conditions such as timing or configuration are required.
  • Fixed version: n/a PostgreSQL 12.21, 13.17, 14.14; azl3 postgresql 16.4-2 on Azure Linux 3.0 16.5-1; azl3 postgresql 16.5-1 on Azure Linux 3.0 16.5-1.

Low priority for now. Upgrade to n/a PostgreSQL 12.21, 13.17, 14.14; azl3 postgresql 16.4-2 on Azure Linux 3.0 16.5-1; azl3 postgresql 16.5-1 on Azure Linux 3.0 16.5-1 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

Incorrect privilege assignment in PostgreSQL allows a less-privileged application user to view or change different rows from those intended. An attack requires the application to use SET ROLE, SET SESSION AUTHORIZATION, or an equivalent feature. The problem arises when an application query uses parameters from the attacker or conveys query results to the attacker. If that query reacts to current_setting('role') or the current user ID, it may modify or return data as though the session had not used SET ROLE or SET SESSION AUTHORIZATION. The attacker does not control which incorrect user ID applies. Query text from less-privileged sources is not a concern here, because SET ROLE and SET SESSION AUTHORIZATION are not sandboxes for unvetted queries. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.

Published
Nov 14, 2024
Updated
Jun 17, 2026
EPSS
0.6% · 53th percentile

Report tools

JSON

Action score

16

Monitor

Low priority for now.

CVSS
16 / 40 · 4.2 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.6%

CISA SSVC decision

Exploitation
none
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
4.2
CNA · PostgreSQL
4.2
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-10978

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

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?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
debiandebian linux

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

    • 17 and later · before 17.1affected · rpm
    • 16 and later · before 16.5affected · rpm
    • 15 and later · before 15.9affected · rpm
    • 14 and later · before 14.14affected · rpm
    • 13 and later · before 13.17affected · rpm
    • before 12.21affected · 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.9.0+3704+f1f917ce1.4.6-3.module_el8.9.0+3704+f1f917ce
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.5.1-1.module_el8.10.0+3930+ecf335541.5.1-1.module_el8.10.0+3930+ecf33554
AlmaLinux:8pg_repackbefore 1.4.8-1.module_el8.10.0+3798+606ebb9f1.4.8-1.module_el8.10.0+3798+606ebb9f
AlmaLinux:8pg_repackbefore 1.4.8-1.module_el8.9.0+3706+885c732e1.4.8-1.module_el8.9.0+3706+885c732e
AlmaLinux:8pgauditbefore 1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.11.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1
AlmaLinux:8pgauditbefore 1.5.0-1.module_el8.6.0+2760+1746ec941.5.0-1.module_el8.6.0+2760+1746ec94
AlmaLinux:8pgauditbefore 1.5.0-1.module_el8.6.0+3095+ee60d9101.5.0-1.module_el8.6.0+3095+ee60d910
AlmaLinux:8pgauditbefore 16.0-1.module_el8.10.0+3798+606ebb9f16.0-1.module_el8.10.0+3798+606ebb9f
AlmaLinux:8pgauditbefore 1.7.0-1.module_el8.9.0+3706+885c732e1.7.0-1.module_el8.9.0+3706+885c732e
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: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 0.10.0-2.module_el8.6.0+2760+1746ec940.10.0-2.module_el8.6.0+2760+1746ec94
AlmaLinux:8postgres-decoderbufsbefore 1.9.7-1.Final.module_el8.9.0+3706+885c732e1.9.7-1.Final.module_el8.9.0+3706+885c732e
AlmaLinux:8postgres-decoderbufsbefore 2.4.0-1.Final.module_el8.10.0+3798+606ebb9f2.4.0-1.Final.module_el8.10.0+3798+606ebb9f
AlmaLinux:8postgresqlbefore 13.18-1.module_el8.10.0+3928+8233d27413.18-1.module_el8.10.0+3928+8233d274
AlmaLinux:8postgresqlbefore 15.10-1.module_el8.10.0+3929+38258aa515.10-1.module_el8.10.0+3929+38258aa5
AlmaLinux:8postgresqlbefore 16.6-1.module_el8.10.0+3930+ecf3355416.6-1.module_el8.10.0+3930+ecf33554
AlmaLinux:8postgresqlbefore 12.22-1.module_el8.10.0+3927+7f0fab7012.22-1.module_el8.10.0+3927+7f0fab70
AlmaLinux:8postgresql-contribbefore 15.10-1.module_el8.10.0+3929+38258aa515.10-1.module_el8.10.0+3929+38258aa5
AlmaLinux:8postgresql-contribbefore 13.18-1.module_el8.10.0+3928+8233d27413.18-1.module_el8.10.0+3928+8233d274
AlmaLinux:8postgresql-contribbefore 16.6-1.module_el8.10.0+3930+ecf3355416.6-1.module_el8.10.0+3930+ecf33554
AlmaLinux:8postgresql-contribbefore 12.22-1.module_el8.10.0+3927+7f0fab7012.22-1.module_el8.10.0+3927+7f0fab70

+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-2024-10976Nov 14, 2024 · PostgreSQL row security below e.g. subqueries disregards user ID changes
    21Monitor
  • ← EarlierCVE-2024-10977Nov 14, 2024 · PostgreSQL libpq retains an error message from man-in-the-middle
    14Monitor
  • Later →CVE-2024-10979Nov 14, 2024 · PostgreSQL PL/Perl environment variable changes execute arbitrary code
    36Monitor

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.21Vendor (CNA)
n/a PostgreSQL13.17Vendor (CNA)
n/a PostgreSQL14.14Vendor (CNA)
n/a PostgreSQL15.9Vendor (CNA)
n/a PostgreSQL16.5Vendor (CNA)
n/a PostgreSQL17.1Vendor (CNA)
azl3 postgresql 16.4-2 on Azure Linux 3.016.5-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
azl3 postgresql 16.5-1 on Azure Linux 3.016.5-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 postgresql 14.13-1 on CBL Mariner 2.014.14-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 postgresql 14.13-1 on CBL-Mariner 2.014.14-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 postgresql 14.14-1 on CBL Mariner 2.014.14-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
almalinux:pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94 · AlmaLinux:8Package registry (OSV)
almalinux:pgaudit1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 · AlmaLinux:8Package registry (OSV)
almalinux:postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-contrib12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-docs12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-plperl12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-plpython312.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-pltcl12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-server12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-server-devel12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
almalinux:postgresql-static12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8Package registry (OSV)
alpine:postgresql1313.17-r0 · Alpine:v3.17Package registry (OSV)
alpine:postgresql1414.14-r0 · Alpine:v3.17Package registry (OSV)
alpine:postgresql1515.9-r0 · Alpine:v3.17Package registry (OSV)
alpine:postgresql1616.5-r0 · Alpine:v3.19Package registry (OSV)
alpine:postgresql1717.1-r0 · Alpine:v3.21Package registry (OSV)
debian:postgresql-1313.17-0+deb11u1 · Debian:11Package registry (OSV)
debian:postgresql-1515.9-0+deb12u1 · Debian:12Package registry (OSV)

+35

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.
  • No user action is required.
  • Special conditions such as timing or configuration are required.

If successful

Confidentiality
low · data can be read
Integrity
low · data or configuration can be modified
Availability
none
Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
Low
Integrity impact
Low
Availability impact
None

CVSS vector

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

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