Description
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time() interpolate the writable part_config.time_dncoder text value without identifier quoting into dynamic SQL. A role with the documented partman_user privileges can store SQL rather than a decoder function name. When an affected operation later uses the poisoned value, including pg_partman_bgw maintenance for a text- or UUID-keyed set, the SQL executes with the operation's privileges, which can be the default PostgreSQL superuser background-worker role. The persistent row can restore elevated access on later ticks, and successful exploitation can permit database-wide compromise and operating-system command execution as the PostgreSQL service account. This issue is fixed in version 5.5.0.
Published: 2026-09-18
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Privilege escalation leading to database‑wide compromise and OS command execution
Action: Immediate Patch
AI Analysis

Impact

The vulnerability allows a role with partman_user privileges to inject SQL into dynamic queries that use the time_dncoder text value of the writable part_config table. This injection can be executed when maintenance or background‑worker functions run, granting the attacker database‑wide control and, in the worst case, the ability to run operating‑system commands as the PostgreSQL service account. The flaw stems from improper quoting of the time_dncoder value in dynamic SQL, a classic SQL injection weakness (CWE‑89).

Affected Systems

The issue affects the pg_partman extension for PostgreSQL (pgpartman) in all releases prior to 5.5.0. Any environment that uses the run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), or partition_data_time() functions is vulnerable unless that extension is upgraded.

Risk and Exploitability

The CVSS base score of 8.5 indicates high severity. The EPSS score is not available, but no known public exploitation is listed in CISA's KEV catalog. Attackers can exploit the flaw from a role with partman_user privileges, and the injected SQL will run with the privileges of the background worker, which may be a PostgreSQL superuser. Successful exploitation could lead to database‑wide compromise and operating‑system command execution.

Generated by OpenCVE AI on September 19, 2026 at 11:15 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pg_partman to version 5.5.0 or later, which removes the vulnerable dynamic SQL handling.
  • Avoid storing arbitrary SQL in part_config.time_dncoder; ensure it contains only valid decoder function names.
  • Limit partman_user role privileges or restrict roles that can modify the part_config table to trusted users only.

Generated by OpenCVE AI on September 19, 2026 at 11:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 18 Sep 2026 21:30:00 +0000

Type Values Removed Values Added
Description pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time() interpolate the writable part_config.time_dncoder text value without identifier quoting into dynamic SQL. A role with the documented partman_user privileges can store SQL rather than a decoder function name. When an affected operation later uses the poisoned value, including pg_partman_bgw maintenance for a text- or UUID-keyed set, the SQL executes with the operation's privileges, which can be the default PostgreSQL superuser background-worker role. The persistent row can restore elevated access on later ticks, and successful exploitation can permit database-wide compromise and operating-system command execution as the PostgreSQL service account. This issue is fixed in version 5.5.0.
Title pg_partman privilege escalation via SQL injection in several functions via time decoder
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 8.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-19T14:11:36.257Z

Reserved: 2026-07-10T20:17:57.992Z

Link: CVE-2026-61817

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-18T20:17:19.163

Modified: 2026-09-19T15:16:59.910

Link: CVE-2026-61817

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-19T11:30:06Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')