Vulnerability · Published Sep 18, 2026 · Assigned by GitHub_M
CVE-2026-61781pg_partman has privilege escalation through SQL injection in create_partition_time()
Critical 9.9
In plain English
A critical-severity SQL injection in pg_partman from pgpartman. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pg-partman | no fix listed | DEBIAN-CVE-2026-61781 |
| Debian:13 | pg-partman | no fix listed | DEBIAN-CVE-2026-61781 |
| Debian:14 | pg-partman | 5.5.0-1 | DEBIAN-CVE-2026-61781 |
| Ubuntu:22.04:LTS | pg-partman | no fix listed | UBUNTU-CVE-2026-61781 |
| Ubuntu:24.04:LTS | pg-partman | no fix listed | UBUNTU-CVE-2026-61781 |
| Ubuntu:26.04:LTS | pg-partman | no fix listed | UBUNTU-CVE-2026-61781 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| pgpartman | pg_partman | < 5.5.0 |
Weakness: CWE-89, CWE-269 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H