CVE-2023-2455
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedRow 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 and then executed under other roles. This scenario can happen under security definer functions or when a common user and query is planned initially and then re-used across multiple SET ROLEs. Applying an incorrect policy may permit a user to complete otherwise-forbidden reads and modifications. This affects only databases that have used CREATE POLICY to define a row security policy.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencePostgreSQL row-level security (RLS) policies fail to properly handle role changes when a query is planned under one role and executed under another. This occurs in security definer functions or when queries are planned once and reused across multiple SET ROLE statements, causing incorrect policies to be applied and potentially allowing unauthorized data access or modifications.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 11.0, < 11.20>= 12.0, < 12.15>= 13.0, < 13.11>= 14.0, < 14.8>= 15.0, < 15.3all versions= 8.0= 9.0= 38CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed PostgreSQL versionRun `SELECT version();` or check with `psql --version` from command line. Compare the version number against the affected ranges: 11.0 to 11.19, 12.0 to 12.14, 13.0 to 13.10, 14.0 to 14.7, 15.0 to 15.2Affected if The installed version falls within any of the affected version ranges
-
Verify if RLS is enabled on any tablesQuery the pg_tables catalog: `SELECT schemaname, tablename FROM pg_tables WHERE schemaname NOT IN ('pg_catalog', 'information_schema') AND EXISTS (SELECT 1 FROM pg_class c JOIN pg_attribute a ON a.attrelid = c.oid WHERE c.relname = tablename AND a.attname = 'rowsecurity' AND a.attbool = true)` or check each table with `\d+ tablename` in psqlAffected if Any table in the database has row-level security enabled
-
Identify security definer functions that access RLS-protected tablesQuery: `SELECT n.nspname AS schema, p.proname AS function FROM pg_proc p JOIN pg_namespace n ON p.pronamespace = n.oid JOIN pg_language l ON p.prolang = l.oid WHERE p.prosecdef = true AND n.nspname NOT IN ('pg_catalog', 'information_schema')`Affected if There are security definer functions (prosecdef = true) in the database
-
Detect SET ROLE usage in applications or scriptsSearch application code, stored procedures, and configuration files for SET ROLE statements. In psql, review session logs or pg_stat_activity for recent SET ROLE commands: `SELECT DISTINCT usename FROM pg_stat_activity WHERE query LIKE '%SET ROLE%'`Affected if SET ROLE is used within the application or database scripts, especially in contexts where queries may be reused across different roles
You are affected if your PostgreSQL version is within the vulnerable ranges AND you have tables with RLS enabled AND your environment uses either security definer functions or SET ROLE statements that could cause query plans to be reused across different roles.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped11.2012.1513.11
Upgrade PostgreSQL to the version that includes the fix. Review and test all row security policies, especially those used within security definer functions or in contexts where SET ROLE is employed.
PostgreSQL 11.20+, 12.15+, 13.11+, or 14.8+ (depending on your major version)
- 1. Identify the current PostgreSQL version by running: psql -V or SELECT version();
- 2. For PostgreSQL 11.x, upgrade to version 11.20 or later
- 3. For PostgreSQL 12.x, upgrade to version 12.15 or later
- 4. For PostgreSQL 13.x, upgrade to version 13.11 or later
- 5. For PostgreSQL 14.x, upgrade to version 14.8 or later
- 6. Before upgrading in production, test the new version in a staging environment
- 7. Ensure row security policies (CREATE POLICY) are tested after upgrade to verify correct enforcement
- 8. For Red Hat Enterprise Linux or Fedora systems, apply system updates via: dnf update postgresql* or yum update postgresql*
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,176.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2023-2455 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2023-2455 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data