CVE-2026-61781pgpartman pg_partman
SQL Injection in pg_partman via unvalidated time_encoder interpolation
Critical 9.9
Follow: this CVE · pgpartman · pgpartman pg_partman We alert you by email or Slack (account required).
- Priority
- 59
- CVSS 3.1
- 9.9
- EPSS
- —
- Auth required
- Yes
- Published
- Sep 18, 2026
- Updated
- Sep 23, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
What happens
pg_partman is a PostgreSQL extension that manages partitioned tables. Versions prior to 5.5.0 interpolate the time_encoder value without validation into dynamically executed SQL statements. A role with partman_user privileges can inject malicious SQL that executes with superuser privileges when pg_partman_bgw creates partitions, allowing database compromise and operating-system command execution.
Show the original NVD text
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, create_partition_time() reads the writable part_config.time_encoder text value and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with the documented partman_user INSERT and UPDATE privileges can store SQL rather than a function name. When pg_partman_bgw later creates a child partition for a text- or UUID-keyed set, the worker executes the stored SQL with pg_partman_bgw.role privileges, which default to PostgreSQL superuser. The persistent configuration row can repeatedly restore elevated access on later maintenance 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.
What to do
Patch available · fixed versions: 5.5.0
Update pg_partman to version 5.5.0 or later.
- Apply the vendor's security update for pg_partman.
Affected products
- pgpartman · pg_partman
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.