CVE-2024-10978: PostgreSQL SET ROLE, SET SESSION AUTHORIZATION reset to wrong user ID
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.
- BDU:2024-09681
- ALSA-2024:10785
- ALSA-2024:10787
- ALSA-2024:10788
- ALSA-2024:10791
- ALSA-2024:10830
- ALSA-2024:10831
- ALSA-2024:10832
- DLA-3954-1
- DSA-5812-1
- openSUSE-SU-2024:14501-1
- openSUSE-SU-2024:14502-1
- openSUSE-SU-2024:14503-1
- openSUSE-SU-2024:14504-1
- openSUSE-SU-2024:14505-1
- openSUSE-SU-2024:14506-1
- RHSA-2024:10785
- RHSA-2024:10787
- RHSA-2024:10788
- RHSA-2024:10791
- Published
- Nov 14, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.6% · 53th percentile
- CWE
- CWE-266
Report tools
Action score
16
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.
Is PostgreSQL on your server exposed to the internet?Run a port scan
Is your version affected? Check itNoroxi 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 helpAffected 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.
| Vendor | Product | CPE |
|---|---|---|
| postgresql | postgresql | cpe:2.3:a:postgresql:postgresql |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Using postgresql? Add it to your stack and be the first to know about CVEs like this one. (PostgreSQL)
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 scanVersions 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
Affected versions · NVD (6)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- postgresql postgresql12.0 and later · before 12.21
- postgresql postgresql13.0 and later · before 13.17
- postgresql postgresql14.0 and later · before 14.14
- postgresql postgresql15.0 and later · before 15.9
- postgresql postgresql16.0 and later · before 16.5
- postgresql postgresql17.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.9.0+3704+f1f917ce | 1.4.6-3.module_el8.9.0+3704+f1f917ce |
| AlmaLinux:8 | pg_repack | before 1.4.6-3.module_el8.6.0+2760+1746ec94 | 1.4.6-3.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | pg_repack | before 1.5.1-1.module_el8.10.0+3930+ecf33554 | 1.5.1-1.module_el8.10.0+3930+ecf33554 |
| AlmaLinux:8 | pg_repack | before 1.4.8-1.module_el8.10.0+3798+606ebb9f | 1.4.8-1.module_el8.10.0+3798+606ebb9f |
| AlmaLinux:8 | pg_repack | before 1.4.8-1.module_el8.9.0+3706+885c732e | 1.4.8-1.module_el8.9.0+3706+885c732e |
| AlmaLinux:8 | pgaudit | before 1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1 | 1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1 |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.6.0+2760+1746ec94 | 1.5.0-1.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | pgaudit | before 1.5.0-1.module_el8.6.0+3095+ee60d910 | 1.5.0-1.module_el8.6.0+3095+ee60d910 |
| AlmaLinux:8 | pgaudit | before 16.0-1.module_el8.10.0+3798+606ebb9f | 16.0-1.module_el8.10.0+3798+606ebb9f |
| AlmaLinux:8 | pgaudit | before 1.7.0-1.module_el8.9.0+3706+885c732e | 1.7.0-1.module_el8.9.0+3706+885c732e |
| AlmaLinux:8 | pgaudit | before 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 | 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.9.0+3704+f1f917ce | 0.10.0-2.module_el8.9.0+3704+f1f917ce |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+3095+ee60d910 | 0.10.0-2.module_el8.6.0+3095+ee60d910 |
| AlmaLinux:8 | postgres-decoderbufs | before 0.10.0-2.module_el8.6.0+2760+1746ec94 | 0.10.0-2.module_el8.6.0+2760+1746ec94 |
| AlmaLinux:8 | postgres-decoderbufs | before 1.9.7-1.Final.module_el8.9.0+3706+885c732e | 1.9.7-1.Final.module_el8.9.0+3706+885c732e |
| AlmaLinux:8 | postgres-decoderbufs | before 2.4.0-1.Final.module_el8.10.0+3798+606ebb9f | 2.4.0-1.Final.module_el8.10.0+3798+606ebb9f |
| AlmaLinux:8 | postgresql | before 13.18-1.module_el8.10.0+3928+8233d274 | 13.18-1.module_el8.10.0+3928+8233d274 |
| AlmaLinux:8 | postgresql | before 15.10-1.module_el8.10.0+3929+38258aa5 | 15.10-1.module_el8.10.0+3929+38258aa5 |
| AlmaLinux:8 | postgresql | before 16.6-1.module_el8.10.0+3930+ecf33554 | 16.6-1.module_el8.10.0+3930+ecf33554 |
| AlmaLinux:8 | postgresql | before 12.22-1.module_el8.10.0+3927+7f0fab70 | 12.22-1.module_el8.10.0+3927+7f0fab70 |
| AlmaLinux:8 | postgresql-contrib | before 15.10-1.module_el8.10.0+3929+38258aa5 | 15.10-1.module_el8.10.0+3929+38258aa5 |
| AlmaLinux:8 | postgresql-contrib | before 13.18-1.module_el8.10.0+3928+8233d274 | 13.18-1.module_el8.10.0+3928+8233d274 |
| AlmaLinux:8 | postgresql-contrib | before 16.6-1.module_el8.10.0+3930+ecf33554 | 16.6-1.module_el8.10.0+3930+ecf33554 |
| AlmaLinux:8 | postgresql-contrib | before 12.22-1.module_el8.10.0+3927+7f0fab70 | 12.22-1.module_el8.10.0+3927+7f0fab70 |
+96
Same product
postgresql: all recordsOther 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 changes21Monitor
- ← EarlierCVE-2024-10977Nov 14, 2024 · PostgreSQL libpq retains an error message from man-in-the-middle14Monitor
- Later →CVE-2024-10979Nov 14, 2024 · PostgreSQL PL/Perl environment variable changes execute arbitrary code36Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| n/a PostgreSQL | 12.21 | Vendor (CNA) |
| n/a PostgreSQL | 13.17 | Vendor (CNA) |
| n/a PostgreSQL | 14.14 | Vendor (CNA) |
| n/a PostgreSQL | 15.9 | Vendor (CNA) |
| n/a PostgreSQL | 16.5 | Vendor (CNA) |
| n/a PostgreSQL | 17.1 | Vendor (CNA) |
| azl3 postgresql 16.4-2 on Azure Linux 3.0 | 16.5-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| azl3 postgresql 16.5-1 on Azure Linux 3.0 | 16.5-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 postgresql 14.13-1 on CBL Mariner 2.0 | 14.14-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 postgresql 14.13-1 on CBL-Mariner 2.0 | 14.14-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 postgresql 14.14-1 on CBL Mariner 2.0 | 14.14-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| almalinux:pg_repack | 1.4.6-3.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:pgaudit | 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgres-decoderbufs | 0.10.0-2.module_el8.6.0+2760+1746ec94 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-contrib | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-docs | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plperl | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-plpython3 | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-pltcl | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-server-devel | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:postgresql-static | 12.22-1.module_el8.10.0+3927+7f0fab70 · AlmaLinux:8 | Package registry (OSV) |
| alpine:postgresql13 | 13.17-r0 · Alpine:v3.17 | Package registry (OSV) |
| alpine:postgresql14 | 14.14-r0 · Alpine:v3.17 | Package registry (OSV) |
| alpine:postgresql15 | 15.9-r0 · Alpine:v3.17 | Package registry (OSV) |
| alpine:postgresql16 | 16.5-r0 · Alpine:v3.19 | Package registry (OSV) |
| alpine:postgresql17 | 17.1-r0 · Alpine:v3.21 | Package registry (OSV) |
| debian:postgresql-13 | 13.17-0+deb11u1 · Debian:11 | Package registry (OSV) |
| debian:postgresql-15 | 15.9-0+deb12u1 · Debian:12 | Package 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.
Credits
All researchersFinders, 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
Weakness class (CWE)
CWE-266 · Incorrect Privilege AssignmentCVSS 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.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.