CVE-2026-61821: pg_partman authorization bypass in drop_partition functions

CVE-2026-61821 · Severity: high · CVSS 8.5 · Published 2026-09-18

pg_partman is a PostgreSQL extension that automates the management of large partitioned tables. A privilege escalation flaw in versions before 5.5.0 allows database users with limited permissions to relocate table partitions into schemas they should not have access to, by exploiting the background worker's superuser privileges. This could enable unauthorized data access or table ownership takeover in multi-tenant database environments.

Technologies: Pgpartman Pg Partman. Vendors: Pgpartman.

Quick answers

Is CVE-2026-61821 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-61821 being exploited in the wild.
How severe is CVE-2026-61821?
High severity, with a CVSS score of 8.5, published 18 September 2026.
Which products and versions are affected?
Pgpartman Pg Partman before 5.5.0.
Is there a fix for CVE-2026-61821?
A patch was published on 2026-07-22. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-61821 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-61821?
Check whether you run Pgpartman Pg Partman at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The drop_partition_id() and drop_partition_time() functions bypass the standard ALTER TABLE SET SCHEMA authorization checks by accepting any retention schema name and executing the relocation under the pg_partman background worker's privileges (defaulting to PostgreSQL superuser). A partman_user role can specify a target schema where the role lacks CREATE privilege, and the superuser background worker performs the operation, bypassing normal PostgreSQL access controls. The fix in 5.5.0 requires that the retention schema be owned by the same role as the child table.

Affected products

  • pgpartman pg_partman before 5.5.0

Timeline

  • 2026-09-18: disclosed
  • 2026-07-22: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.