CVE-2026-61820
pg_partman privilege escalation via SQL injection when inheriting template properties
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.5
pg_partman privilege escalation via SQL injection when inheriting template properties
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.
- Record
CVE-2026-61820- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2026-83433
8.5
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.
- Record
EUVD-2026-83433- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
NVD
8.5
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.
- Record
CVE-2026-61820- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
8.5
pg_partman privilege escalation via SQL injection when inheriting template properties
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.
- Record
CVE-2026-61820- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-61820
8.5
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.
- Record
DEBIAN-CVE-2026-61820- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-61820
8.5
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.
- Record
UBUNTU-CVE-2026-61820- CVSS 3.1
- 8.5 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pg-partmanDebian:12 |
All versions, plus listed versions 4.7.2-14.7.3-14.7.4-25.0.0-15.0.0-2 Show 16 moreShow less5.0.1-15.1.0-15.1.0-25.2.0-15.2.1-15.2.2-15.2.4-15.3.0-15.3.0~rc1-15.3.1-15.3.1-25.4.0-15.4.1-15.4.2-15.4.3-15.5.0-1 |
None known |
pg-partmanDebian:13 |
All versions, plus listed versions 5.2.4-15.3.0-15.3.0~rc1-15.3.1-15.3.1-2 Show 5 moreShow less5.4.0-15.4.1-15.4.2-15.4.3-15.5.0-1 |
None known |
pg-partmanDebian:14 |
before 5.5.0-1, plus listed versions 5.2.4-15.3.0-15.3.0~rc1-15.3.1-15.3.1-2 Show 4 moreShow less5.4.0-15.4.1-15.4.2-15.4.3-1 |
5.5.0-1 |
pg-partmanUbuntu:16.04:LTS |
All versions, plus listed versions 2.2.2-12.2.2-2 |
None known |
pg-partmanUbuntu:18.04:LTS |
All versions, plus listed versions 2.6.3-13.1.0-13.1.1-13.1.2-1 |
None known |
pg-partmanUbuntu:20.04:LTS |
All versions, plus listed versions 4.0.0-14.2.0-14.2.2-14.3.0-1 |
None known |
pg-partmanUbuntu:22.04:LTS |
All versions, plus listed versions 4.5.1-14.6.0-1 |
None known |
pg-partmanUbuntu:24.04:LTS |
All versions, plus listed versions 4.7.3-15.0.0-25.0.1-1 |
None known |
pg-partmanUbuntu:26.04:LTS |
All versions, plus listed versions 5.2.4-15.3.1-25.4.0-15.4.1-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-61820 is a high vulnerability (CVSS 8.5) in Pgpartman Pg Partman, published September 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.73%, the 54th percentile. Fixed in pg-partman 5.5.0-1.
References
github.com/pgpartman/pg_partman/security/advisories/GHSA-xqxh-6hh3-974m
github.com/pgpartman/pg_partman/commit/ba9405542acf24dd881845b935cab8b165854361
github.com/pgpartman/pg_partman/releases/tag/v5.5.0
github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61820.json
nvd.nist.gov/vuln/detail/CVE-2026-61820
security-tracker.debian.org/tracker/CVE-2026-61820
ubuntu.com/security/CVE-2026-61820
cve.org/CVERecord?id=CVE-2026-61820