Open Source Vulnerability in PostgreSQL

postgresql Updated 02 Oct 2025

Summary

09/06/2023
N/A
Yes i
Medium
5.4

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback