Vulnerability · Published Nov 14, 2024 · Assigned by PostgreSQL

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

Medium 4.2

In plain English

A medium-severity security flaw in PostgreSQL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.2Medium
Exploit odds (30 days)0.7%top 47.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2024:10785
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2024:10832
AlmaLinux:8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2024:10785
AlmaLinux:8pg_repack1.4.8-1.module_el8.10.0+3798+606ebb9fALSA-2024:10830
AlmaLinux:8pg_repack1.5.1-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8pg_repack1.4.8-1.module_el8.9.0+3706+885c732eALSA-2024:10830
AlmaLinux:8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2024:10832
AlmaLinux:9pg_repack1.5.1-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9pg_repack1.5.1-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9pg_repack1.4.8-2.module_el9.5.0+120+4533eb20ALSA-2024:10787
AlmaLinux:8pgaudit1.4.0-7.module_el8.10.0+3889+48cb11fb.alma.1ALSA-2024:10785
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2024:10832
AlmaLinux:8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2024:10832
AlmaLinux:8pgaudit16.0-1.module_el8.10.0+3798+606ebb9fALSA-2024:10831
AlmaLinux:8pgaudit1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1ALSA-2024:10785
AlmaLinux:8pgaudit1.7.0-1.module_el8.9.0+3706+885c732eALSA-2024:10830
AlmaLinux:9pgaudit16.0-1.module_el9.4.0+66+eb9878bcALSA-2024:10788
AlmaLinux:9pgaudit1.7.0-1.module_el9.3.0+52+21733919ALSA-2024:10787
AlmaLinux:9pgvector0.6.2-1.module_el9.5.0+120+4533eb20ALSA-2024:10788
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.9.0+3704+f1f917ceALSA-2024:10832
AlmaLinux:8postgres-decoderbufs2.4.0-1.Final.module_el8.10.0+3798+606ebb9fALSA-2024:10831
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2024:10785
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2024:10785
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.9.0+3704+f1f917ceALSA-2024:10785
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2024:10832
AlmaLinux:8postgres-decoderbufs1.9.7-1.Final.module_el8.9.0+3706+885c732eALSA-2024:10830
AlmaLinux:8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2024:10832
AlmaLinux:9postgres-decoderbufs2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2024:10788
AlmaLinux:9postgres-decoderbufs1.9.7-1.Final.module_el9.3.0+52+21733919ALSA-2024:10787
AlmaLinux:8postgresql15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:9postgresql13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:8postgresql-contrib12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-contrib15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-contrib16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-contrib13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:9postgresql-contrib16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-contrib16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-contrib13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-contrib15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:8postgresql-docs12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-docs13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-docs16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-docs15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:9postgresql-docs13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-docs15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-docs16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-docs16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:8postgresql-plperl12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-plperl13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-plperl15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-plperl16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:9postgresql-plperl15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-plperl13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-plperl16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:8postgresql-plpython313.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-plpython315.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-plpython316.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-plpython312.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:9postgresql-plpython315.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-plpython316.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-plpython316.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-plpython313.18-1.el9_5ALSA-2024:10791
AlmaLinux:8postgresql-pltcl16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-pltcl12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-pltcl15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-pltcl13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:9postgresql-pltcl15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-pltcl13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-pltcl16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:8postgresql-private-devel15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-private-devel16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:9postgresql-private-devel15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-private-devel13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-private-devel16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-private-devel16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:8postgresql-private-libs16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-private-libs15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:9postgresql-private-libs16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-private-libs16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-private-libs15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-private-libs13.18-1.el9_5ALSA-2024:10791
AlmaLinux:8postgresql-server16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-server13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-server12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-server15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:9postgresql-server16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-server16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-server15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-server13.18-1.el9_5ALSA-2024:10791
AlmaLinux:8postgresql-server-devel12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-server-devel16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-server-devel15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-server-devel13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:9postgresql-server-devel13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-server-devel16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-server-devel16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-server-devel15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:8postgresql-static16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-static13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-static12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-static15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:9postgresql-static16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-static15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-static16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-static13.18-1.el9_5ALSA-2024:10791
AlmaLinux:8postgresql-test16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-test13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-test12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-test15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:9postgresql-test16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-test13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-test16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-test15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:8postgresql-test-rpm-macros16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-test-rpm-macros12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-test-rpm-macros15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-test-rpm-macros13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:9postgresql-test-rpm-macros16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-test-rpm-macros15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-test-rpm-macros13.18-1.el9_5ALSA-2024:10791
AlmaLinux:8postgresql-upgrade12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:8postgresql-upgrade15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-upgrade16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-upgrade13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:9postgresql-upgrade16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
AlmaLinux:9postgresql-upgrade15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-upgrade13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-upgrade16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:8postgresql-upgrade-devel16.6-1.module_el8.10.0+3930+ecf33554ALSA-2024:10831
AlmaLinux:8postgresql-upgrade-devel13.18-1.module_el8.10.0+3928+8233d274ALSA-2024:10832
AlmaLinux:8postgresql-upgrade-devel15.10-1.module_el8.10.0+3929+38258aa5ALSA-2024:10830
AlmaLinux:8postgresql-upgrade-devel12.22-1.module_el8.10.0+3927+7f0fab70ALSA-2024:10785
AlmaLinux:9postgresql-upgrade-devel13.18-1.el9_5ALSA-2024:10791
AlmaLinux:9postgresql-upgrade-devel15.10-1.module_el9.5.0+126+03d48c9fALSA-2024:10787
AlmaLinux:9postgresql-upgrade-devel16.6-1.module_el9.5.0+128+1095dce2ALSA-2024:10788
AlmaLinux:9postgresql-upgrade-devel16.6-1.module_el9.5.0+127+50ff03a9ALSA-2024:10788
Alpine:v3.20postgresql1414.14-r0ALPINE-CVE-2024-10978
Alpine:v3.20postgresql1515.9-r0ALPINE-CVE-2024-10978
Alpine:v3.21postgresql1515.9-r0ALPINE-CVE-2024-10978
Alpine:v3.22postgresql1515.9-r0ALPINE-CVE-2024-10978
Alpine:v3.20postgresql1616.5-r0ALPINE-CVE-2024-10978
Alpine:v3.21postgresql1616.5-r0ALPINE-CVE-2024-10978
Alpine:v3.22postgresql1616.5-r0ALPINE-CVE-2024-10978
Alpine:v3.23postgresql1616.5-r0ALPINE-CVE-2024-10978
Alpine:v3.24postgresql1616.5-r0ALPINE-CVE-2024-10978
Alpine:v3.21postgresql1717.1-r0ALPINE-CVE-2024-10978
Alpine:v3.22postgresql1717.1-r0ALPINE-CVE-2024-10978
Alpine:v3.23postgresql1717.1-r0ALPINE-CVE-2024-10978
Alpine:v3.24postgresql1717.1-r0ALPINE-CVE-2024-10978
Debian:12postgresql-1515.9-0+deb12u1DSA-5812-1
Debian:12postgresql-1515.9-0+deb12u1DEBIAN-CVE-2024-10978
Debian:13postgresql-1717.1-1DEBIAN-CVE-2024-10978
Rocky Linux:8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2024:10830
Rocky Linux:8pg_repack0:1.5.1-1.module+el8.10.0+1900+d7340343RLSA-2024:10831
Rocky Linux:8pg_repack0:1.4.6-3.module+el8.10.0+1862+29bef648RLSA-2024:10785
Rocky Linux:9pg_repack0:1.5.1-1.module+el9.5.0+30638+72f697e1RLSA-2024:10788
Rocky Linux:9pg_repack0:1.4.8-2.module+el9.5.0+30637+4391fccaRLSA-2024:10787
Rocky Linux:8pgaudit0:1.4.0-7.module+el8.9.0+1735+a332307bRLSA-2024:10785
Rocky Linux:8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2024:10830
Rocky Linux:8pgaudit0:16.0-1.module+el8.10.0+1622+bd25b19cRLSA-2024:10831
Rocky Linux:9pgaudit0:1.7.0-1.module+el9.5.0+30637+4391fccaRLSA-2024:10787
Rocky Linux:9pgaudit0:16.0-1.module+el9.5.0+30638+72f697e1RLSA-2024:10788
Rocky Linux:9pgvector0:0.6.2-1.module+el9.5.0+30638+72f697e1RLSA-2024:10788
Rocky Linux:8postgres-decoderbufs0:2.4.0-1.Final.module+el8.10.0+1622+bd25b19cRLSA-2024:10831
Rocky Linux:8postgres-decoderbufs0:0.10.0-2.module+el8.10.0+1862+29bef648RLSA-2024:10785
Rocky Linux:8postgres-decoderbufs0:1.9.7-1.Final.module+el8.9.0+1525+fc91df60RLSA-2024:10830
Rocky Linux:9postgres-decoderbufs0:2.4.0-1.Final.module+el9.5.0+30638+72f697e1RLSA-2024:10788
Rocky Linux:9postgres-decoderbufs0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2024:10787
Rocky Linux:8postgresql0:12.22-1.module+el8.10.0+1897+c7883fdeRLSA-2024:10785
Rocky Linux:8postgresql0:15.10-1.module+el8.10.0+1899+05bbdd2cRLSA-2024:10830
Rocky Linux:8postgresql0:16.6-1.module+el8.10.0+1900+d7340343RLSA-2024:10831
Ubuntu:22.04:LTSpostgresql-1414.15-0ubuntu0.22.04.1USN-7132-1
Ubuntu:22.04:LTSpostgresql-1414.15-0ubuntu0.22.04.1UBUNTU-CVE-2024-10978
Ubuntu:24.04:LTSpostgresql-1616.6-0ubuntu0.24.04.1USN-7132-1
Ubuntu:24.04:LTSpostgresql-1616.6-0ubuntu0.24.04.1UBUNTU-CVE-2024-10978

Affected products (as reported)

VendorProductVersions
n/a PostgreSQL 17 – before 17.116 – before 16.515 – before 15.914 – before 14.1413 – before 13.170 – before 12.21

Weakness: CWE-266 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

References