Skip to main content
CVE-2024-10978VulnerabilityPublished Updated

CVE-2024-10978: PostgreSQL · Incorrect Privilege Assignment

Affects PostgreSQLSource CVE Database V5

0

Not known to be exploited · CVSS 4.2 Medium · fixed in 17.1 : update PostgreSQL when convenient.

Data as of 26 Oct 2026, 07:57 UTC

CVSS 3.1 base score
4.2Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 52% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 17.1, 16.5, 15.9 +3
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 16 Nov 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
Postgresqlpostgresql/postgresqlpkg:deb/postgresql/postgresqlOther threatsAffected
  • <17.1
  • <16.5
  • <15.9
  • <14.14
  • <13.17
  • <12.21
Fixed in
  • 17.1
  • 16.5
  • 15.9
  • 14.14
  • 13.17
  • 12.21

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade PostgreSQL to the fixed versions: 17.1, 16.5, 15.9, 14.14, 13.17, or 12.21 or later to ensure the vulnerability is patched. 2. Review and audit application code that uses SET ROLE or SET SESSION AUTHORIZATION to ensure it does not rely on current_setting('role') or current user ID for access control decisions. 3. Implement strict input validation and parameter sanitization to prevent attacker-controlled parameters from influencing queries that use role switching. 4. Avoid returning query results directly to untrusted users when role switching is involved. 5. Employ additional application-level access controls and logging to detect anomalous access patterns related to role switching. 6. Conduct penetration testing focused on role-switching scenarios to identify potential exploitation paths. 7. Monitor PostgreSQL logs for unusual SET ROLE or SET SESSION AUTHORIZATION usage. 8. Educate developers and DBAs about the risks of relying on session role settings for security decisions. 9. Consider using row-level security policies that do not depend on session role settings or current user ID functions. 10. Maintain an incident response plan to quickly address any suspected exploitation.

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.

References

Community reviews

Loading reviews…