PostgreSQL Row Security Policy Vulnerability in Alpine Packages - CVE-2023-2455

postgresql Updated 02 Oct 2025

Summary

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

ALPINE-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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

PostgreSQL is a powerful, open-source relational database system that uses and extends the SQL language. It is known for its robustness, extensibility, and support for advanced data types. The vulnerability in question affects the PostgreSQL package in various Alpine Linux versions, specifically related to row security policies that may not function as intended under certain role changes.

Vulnerability Detail

The vulnerability arises from the handling of row security policies in PostgreSQL, where user ID changes after inlining can lead to incorrect policies being applied. This issue can occur when role-specific policies are used, and a query is planned under one role but executed under another. This scenario is particularly relevant in security definer functions or when a common user and query are reused across multiple SET ROLEs. As a result, a user may be able to perform unauthorized reads and modifications, undermining the security model of the database. The vulnerability affects databases that have implemented CREATE POLICY for defining row security policies.

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

As a temporary workaround, consider reviewing and adjusting your row security policies to ensure they are not reliant on user ID changes after inlining. Additionally, avoid using security definer functions if possible until the package is updated.

Conclusion

In summary, CVE-2023-2455 is a significant vulnerability affecting PostgreSQL row security policies in various Alpine Linux versions. It is crucial to update to the patched versions to mitigate the risks associated with unauthorized data access. Regular monitoring and updates are essential for maintaining database security.

See every vulnerability recorded for postgresql →

Share this vulnerability

FAQ

CVE-2023-2455 is a vulnerability in PostgreSQL that affects row security policies, allowing incorrect policies to be applied under certain conditions.

The vulnerability affects PostgreSQL packages in Alpine Linux versions 3.13, 3.14, 3.15, 3.16, 3.17, 3.18, 3.19, and 3.20.

The vulnerability may allow unauthorized users to perform reads and modifications that should be restricted, compromising database security.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 5.4, indicating a moderate severity level.

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