{"id":"CVE-2026-61820","aliases":["DEBIAN-CVE-2026-61820","EUVD-2026-83433","GHSA-xqxh-6hh3-974m","UBUNTU-CVE-2026-61820"],"status":"published","title":"pg_partman privilege escalation via SQL injection when inheriting template properties","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","severity":{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00729,"percentile":0.5454,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2026-09-18T19:49:10Z","modified":"2026-10-28T02:30:21Z","fixes":[{"ecosystem":"Debian:14","package":"pg-partman","fixed_in":["5.5.0-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.7.2-1","4.7.3-1","4.7.4-2","5.0.0-1","5.0.0-2","5.0.1-1","5.1.0-1","5.1.0-2","5.2.0-1","5.2.1-1","5.2.2-1","5.2.4-1","5.3.0-1","5.3.0~rc1-1","5.3.1-1","5.3.1-2","5.4.0-1","5.4.1-1","5.4.2-1","5.4.3-1","5.5.0-1"]},{"source":"osv","ecosystem":"Debian:13","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.4-1","5.3.0-1","5.3.0~rc1-1","5.3.1-1","5.3.1-2","5.4.0-1","5.4.1-1","5.4.2-1","5.4.3-1","5.5.0-1"]},{"source":"osv","ecosystem":"Debian:14","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.5.0-1"}]}],"versions":["5.2.4-1","5.3.0-1","5.3.0~rc1-1","5.3.1-1","5.3.1-2","5.4.0-1","5.4.1-1","5.4.2-1","5.4.3-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.2-1","2.2.2-2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.3-1","3.1.0-1","3.1.1-1","3.1.2-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.0.0-1","4.2.0-1","4.2.2-1","4.3.0-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.5.1-1","4.6.0-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.7.3-1","5.0.0-2","5.0.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"pg-partman","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.2.4-1","5.3.1-2","5.4.0-1","5.4.1-1"]}],"products":[{"vendor":"pgpartman","product":"pg_partman"}],"references":[{"url":"https://github.com/pgpartman/pg_partman/security/advisories/GHSA-xqxh-6hh3-974m","tags":["x_refsource_CONFIRM","advisory","report"]},{"url":"https://github.com/pgpartman/pg_partman/commit/ba9405542acf24dd881845b935cab8b165854361","tags":["x_refsource_MISC","fix","report"]},{"url":"https://github.com/pgpartman/pg_partman/releases/tag/v5.5.0","tags":["x_refsource_MISC","web","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61820.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61820","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-61820","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-61820","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-61820","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-61820","title":"pg_partman privilege escalation via SQL injection when inheriting template properties","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T19:49:10.983Z","modified":"2026-09-22T15:39:45.442Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:19:53.786088Z"}],"euvd":[{"id":"EUVD-2026-83433","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T19:49:10Z","modified":"2026-09-22T15:39:45Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T17:28:02.601428Z"}],"nvd":[{"id":"CVE-2026-61820","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T20:17:20.067Z","modified":"2026-09-23T18:28:25.093Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:12:50.043898Z"}],"osv":[{"id":"CVE-2026-61820","title":"pg_partman privilege escalation via SQL injection when inheriting template properties","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T19:49:10.983Z","modified":"2026-10-28T02:30:21.071720624Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:45:12.933503Z"},{"id":"DEBIAN-CVE-2026-61820","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T20:17:20.067Z","modified":"2026-09-24T08:47:33.016400647Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:57.932517Z"},{"id":"UBUNTU-CVE-2026-61820","description":"pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, inherit_template_properties() manually surrounds primary-key column names from pg_attribute.attname with double quotes without escaping embedded double-quote characters. A partman_user who owns a template table can create a crafted column name that breaks out of the generated ALTER TABLE ADD PRIMARY KEY identifier when the background worker applies the key to a child partition. The generated SQL then executes with pg_partman_bgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The crafted catalog identifier persists until removed and can trigger again during later partition creation. This issue is fixed in version 5.5.0.","status":"published","published":"2026-09-18T20:17:00Z","modified":"2026-09-23T23:31:26Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:56:43.630667Z"}]}}
