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.

Severity (CVSS 3.1)9.9Critical
Exploit odds (30 days)0.8%top 43.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12pg-partmanno fix listedDEBIAN-CVE-2026-61781
Debian:13pg-partmanno fix listedDEBIAN-CVE-2026-61781
Debian:14pg-partman5.5.0-1DEBIAN-CVE-2026-61781
Ubuntu:22.04:LTSpg-partmanno fix listedUBUNTU-CVE-2026-61781
Ubuntu:24.04:LTSpg-partmanno fix listedUBUNTU-CVE-2026-61781
Ubuntu:26.04:LTSpg-partmanno fix listedUBUNTU-CVE-2026-61781

Affected products (as reported)

VendorProductVersions
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

References