Open Source Vulnerability in PostgreSQL
Summary
CVE-2023-2455: Row security policies disregard user ID changes after inlining; PostgreSQL could permit incorrect policies to be applied in certain cases where role-specific policies are used and a given query is planned under one role... Affects postgresql versions < 13.11-r0. Fixed in 13.11-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
PostgreSQL is an open-source relational database management system known for its robustness, scalability, and extensibility. It is widely used in various applications and industries. However, a vulnerability has been discovered in PostgreSQL that could allow incorrect row security policies to be applied under certain circumstances. This vulnerability affects databases that have used CREATE POLICY to define row security policies.
Vulnerability Detail
The vulnerability (CVE-2023-2455) in PostgreSQL allows for the disregard of user ID changes after inlining. This can result in incorrect policies being applied, especially when role-specific policies are used and a query is planned under one role but executed under other roles. This vulnerability can be exploited through security definer functions or when a common user and query are planned initially and then reused across multiple SET ROLEs. If an incorrect policy is applied, it may enable a user to perform reads and modifications that are otherwise forbidden.
How To Fix
Minimum fixed version
13.11-r0
This is the first release that contains the fix.
sudo apk add --upgrade postgresql
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround available for this vulnerability. It is crucial to update PostgreSQL to the fixed version as soon as possible to mitigate the risk of exploitation.
Conclusion
The vulnerability in PostgreSQL allows for the incorrect application of row security policies, potentially enabling unauthorized reads and modifications. It is crucial to update PostgreSQL to the fixed version (13.11-r0 or later) to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for postgresql →
FAQ
The vulnerability affects PostgreSQL versions prior to 13.11-r0.
No, this vulnerability requires the attacker to have authenticated access to the database.
There are no known instances of this vulnerability being exploited in the wild.
Yes, the CVSS score of this vulnerability is 5.4.
You can find more information about this vulnerability in the provided source link.
Related vulnerabilities
Recent vulnerabilities recorded for postgresql.