CVE-2026-61817: pg_partman SQL injection in time_dncoder value

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

pg_partman is a PostgreSQL extension that automates the creation and management of partitioned tables. A flaw in versions before 5.5.0 allows a user with basic pg_partman privileges to inject arbitrary SQL code through a configuration field, which executes with elevated database privileges—potentially including superuser access when the maintenance background worker runs. An attacker could exploit this to compromise the entire database or execute operating system commands as the PostgreSQL service account.

Technologies: Pgpartman Pg Partman. Vendors: Pgpartman.

Quick answers

Is CVE-2026-61817 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-61817 being exploited in the wild.
How severe is CVE-2026-61817?
High severity, with a CVSS score of 8.5, published 18 September 2026.
Which products and versions are affected?
Pgpartman Pg Partman prior to 5.5.0.
Is there a fix for CVE-2026-61817?
A patch was published on 2026-07-22: Version 5.5.0 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-61817 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-61817?
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 vulnerability is a SQL injection in the part_config.time_dncoder field, where user-supplied text is interpolated directly into dynamic SQL without identifier quoting in functions such as run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time(). A partman_user with documented privileges can store malicious SQL instead of a decoder function name; when these functions or the background worker execute the poisoned value, the injected SQL runs with the operation's privileges. The fix in 5.5.0 properly quotes identifiers and implements Row Level Security controls, additionally changing the default background worker role from superuser to a restricted role.

Affected products

  • pgpartman pg_partman prior to 5.5.0

Timeline

  • 2026-09-18: disclosed
  • 2026-07-22: patched: Version 5.5.0 released

References

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