CVE-2026-61781
pgpartman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, createpartitiontime() reads the writable partconfig.timeencoder text value and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with the documented partmanuser INSERT and UPDATE privileges can store SQL rather than a function name. When pgpartmanbgw later creates a child partition for a text- or UUID-keyed set, the worker executes the stored SQL with pgpartmanbgw.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.
Package Versions Affected
Automatically patch vulnerabilities without upgrading
CVSS Version



Related Resources
References
https://github.com/pgpartman/pgpartman/releases/tag/v5.5.0, https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61781.json, https://github.com/pgpartman/pgpartman/security/advisories/GHSA-742w-3j7c-qwvp, https://nvd.nist.gov/vuln/detail/CVE-2026-61781, https://github.com/pgpartman/pg_partman/commit/ba9405542acf24dd881845b935cab8b165854361