Skip to main content

pg_partman EUVDEUVD-2026-83425

| CVE-2026-61821 HIGH
Missing Authorization (CWE-862)
2026-09-18 GitHub_M
8.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain partman_user role in shared DB
  2. Delivery
    Set part_config.retention_schema to attacker-chosen schema
  3. Exploit
    Trigger/await retention run
  4. Execution
    Superuser BGW executes ALTER TABLE SET SCHEMA
  5. Persist
    Child tables relocated cross-schema
  6. Impact
    Cross-tenant table ownership takeover

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization checks on every request
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an authenticated PostgreSQL role holding partman_user access (PR:L) in a database running pg_partman prior to 5.5.0, AND the pg_partman background worker configured with pg_partman_bgw.role set to a superuser (the pre-5.5.0 default) so the BGW performs ALTER TABLE SET SCHEMA with superuser privileges. Retention must be configured (drop_partition_id()/drop_partition_time() with a non-empty part_config.retention_schema). The realistic-impact case is a MULTI-TENANT deployment where multiple roles use pg_partman for their own partition sets; in a single-owner deployment there are no other tenants' tables to take over. Limiting factors: insider/tenant-level access is required (not remote-unauthenticated), and configuring the BGW with a non-superuser role - possible even before upgrading - fully neutralizes the escalation.

Impact

This is a genuine but bounded broken-authorization flaw (CWE-862), not a headline-grade remote takeover. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N supports network reach with low attacker privileges and no user interaction, but the PR:L is meaningful: the attacker must already hold a partman_user role in the target database, so exploitation is confined to insiders/tenants with legitimate pg_partman access. There is NO EPSS score, NO CISA KEV listing, and NO public POC in the provided data - all exploitation-probability signals are absent, so real-world weaponization is unindicated. The core precondition is architectural: the pg_partman background worker must run as a superuser (the pre-5.5.0 default), which is what lets the BGW bypass the ALTER TABLE SET SCHEMA authorization check. I MOSTLY AGREE with the vendor severity but DISPUTE the impact distribution: the description and the vendor CHANGELOG frame this as 'table ownership takeover in multi-tenant environments,' which is primarily an INTEGRITY impact (relocating/taking over other tenants' child tables), not the C:H the vendor assigned; I assess it closer to C:L/I:H/A:N (~8.0). Bottom line: real priority ONLY in multi-tenant PostgreSQL deployments where multiple roles share pg_partman and the BGW runs as superuser - otherwise low practical risk.

Exploit ScenarioDerived

In a shared PostgreSQL instance where several tenants use pg_partman, a low-privileged tenant with partman_user access sets part_config.retention_schema to a schema they control (or one belonging to another tenant) even though they lack CREATE privilege there. When retention runs, the superuser-privileged background worker executes ALTER TABLE SET SCHEMA on the retained child tables, relocating them across the schema boundary and enabling cross-tenant table/ownership takeover. No public exploit code is identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 18, 2026

Unauthorized relocation of retained partition child tables in pg_partman before 5.5.0 lets an authenticated database role holding partman_user access move another tenant's child tables into a schema it does not own. The cause is that drop_partition_id() and drop_partition_time() pass part_config.retention_schema straight into ALTER TABLE SET SCHEMA, and the background worker executes the move under pg_partman_bgw.role - a PostgreSQL superuser by default before this release - so the privilege check that normally guards SET SCHEMA is never enforced. The realistic impact is bounded to multi-tenant deployments where several roles own partition sets on the same instance, no public exploit code was identified at time of analysis, and the escalation is fully neutralized by pointing pg_partman_bgw.role at a non-superuser role, which the vendor confirms can be done even before upgrading.

RemediationAI

Vendor-released patch: upgrade to pg_partman 5.5.0 (release tag v5.5.0, fix commit ba9405542acf24dd881845b935cab8b165854361); the vendor advisory is at https://github.com/pgpartman/pg_partman/security/advisories/GHSA-pxp2-x8cf-rfhc. Because 5.5.0 is an explicitly breaking release, the default pg_partman_bgw.role changes to the non-superuser role 'partman_maintainer', and if that role does not exist with adequate privileges the background worker will stop running successfully and log errors - so before or during the upgrade create the role and grant it ownership of each role that owns a pg_partman-managed partition set (for example GRANT table_owner_alpha TO partman_maintainer, repeated per tenant). If upgrading immediately is not possible, the privilege escalation can be neutralized without the upgrade by changing pg_partman_bgw.role from a superuser to a dedicated non-superuser role; the trade-off is that this role then needs equivalent access to all managed partitioned tables (the vendor requires a reload and documents the privilege setup). In parallel, audit part_config.retention_schema and clear or correct any value pointing to a schema not owned by the same role that owns the child tables. Row Level Security policies on part_config and part_config_sub restrict cross-tenant maintenance but require 5.5.0, since the maintenance_role column used to drive them is introduced in that release. Follow the 5.5.0 README setup guidance for running pg_partman with no superuser at all, with or without the background worker.

Affected VersionsENISA

pg_partman < 5.5.0

Affected Packages

euvd pg_partman fix: 5.5.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pg_partman is a PostgreSQL extension that automates creation and retention of time- or ID-based partitioned tables. This defect is a missing-authorization issue (CWE-862): the retention routines drop_partition_id() and drop_partition_time() read part_config.retention_schema and use that value as the destination of ALTER TABLE ... SET SCHEMA without validating that the calling role owns the child table or holds CREATE on the destination schema. Under normal PostgreSQL rules, ALTER TABLE SET SCHEMA requires both table ownership and CREATE on the target schema, so the operation should have been rejected; instead the move is delegated to the background worker (pg_partman_bgw), which runs as pg_partman_bgw.role and therefore executes with superuser privileges in pre-5.5.0 installs, bypassing the check entirely. The affected CPE is cpe:2.3:a:pgpartman:pg_partman:*:*:*:*:*:*:*:*, i.e. every release before 5.5.0. The upstream fix in commit ba9405542acf24dd881845b935cab8b165854361 (released as v5.5.0) now requires the target retention schema to be owned by the same role that owns the child table; the same release changes the default pg_partman_bgw.role to the non-superuser 'partman_maintainer' and adds a maintenance_role column to part_config/part_config_sub to enable Row Level Security tenant isolation. The 5.5.0 changelog also bundles fixes for related SQL-injection and privilege-escalation flaws (CVE-2026-61781, CVE-2026-61817, CVE-2026-61818, CVE-2026-61819, CVE-2026-61820, CVE-2026-61822).

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.5 HIGH
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
vuln.today AI 8.5 HIGH

Authenticated partman_user (PR:L) over the network (AV:N), no interaction; superuser BGW crosses tenant authority (S:C); primary impact is cross-tenant table/ownership takeover (I:H) with incidental read (C:L), no availability effect.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N
Red Hat 8.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Sep 18, 2026 - 21:18 EUVD
CVE Published
Sep 18, 2026 - 19:46 cve.org
HIGH 8.5

DescriptionCVE.org

pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, drop_partition_id() and drop_partition_time() use part_config.retention_schema as the target for ALTER TABLE SET SCHEMA and accept any nonempty schema name. A role with partman_user access can select a target schema where the role lacks the normal CREATE privilege, and the background worker performs the relocation with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, bypassing the authorization check that a normal ALTER TABLE SET SCHEMA operation would enforce. This permits unauthorized relocation of retained child tables between schemas. This issue is fixed in version 5.5.0.

Technical POC Analysis

CWE-862 (Missing Authorization).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

pg_partman, the PostgreSQL partition-management extension, can let a database role holding partman_user access move another tenant's retained partition child tables into a schema it does not own, breaking the tenant-isolation boundary that multi-tenant database platforms depend on. Exposure is limited to deployments where several roles own partition sets on the same PostgreSQL instance, and the abuse requires privileges the actor must already hold, but the consequence is cross-tenant data-integrity and isolation loss on a system for which no vendor-released patch was identified at the time of analysis. Leadership should care because this is a compliance, audit and customer-trust issue rather than a perimeter breach, and the vendor confirms a configuration change to the background worker role neutralizes the escalation immediately.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis (the advisory references pg_partman 5.5.0 as the release in which the behavior is corrected). Interim mitigations: point pg_partman_bgw.role at a dedicated non-superuser role, which the vendor confirms fully neutralizes the escalation and can be done before upgrading; restrict partman_user grants and part_config.retention_schema ownership to trusted roles only; isolate multi-tenant partition sets onto separate instances or independently owned schemas; and audit and alert on ALTER TABLE ... SET SCHEMA operations issued by the pg_partman background worker. No public exploit identified at time of analysis.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Medium
Popular PostgreSQL extension (RDS/Azure/Supabase/GCP) but multi-tenant + superuser-BGW dependent
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy