CVE catalog

CVE-2026-61820

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

[CVE catalog]

Severity
High · CVSS 8.5CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.73% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpg-partmansid5.5.0-1fixed
Debianpg-partmanforky5.5.0-1fixed
Debianpg-partmantrixie5.2.4-1vulnerable
Debianpg-partmanbookworm4.7.2-1vulnerable
Ubuntupg-partman16.042.2.2-1vulnerable
Ubuntupg-partman16.042.2.2-2vulnerable
Ubuntupg-partman18.042.6.3-1vulnerable
Ubuntupg-partman18.043.1.0-1vulnerable
Ubuntupg-partman18.043.1.1-1vulnerable
Ubuntupg-partman18.043.1.2-1vulnerable
Ubuntupg-partman20.044.0.0-1vulnerable
Ubuntupg-partman20.044.2.0-1vulnerable
Ubuntupg-partman20.044.2.2-1vulnerable
Ubuntupg-partman20.044.3.0-1vulnerable
Ubuntupg-partman22.044.5.1-1vulnerable
Ubuntupg-partman22.044.6.0-1vulnerable
Ubuntupg-partman24.044.7.3-1vulnerable
Ubuntupg-partman24.045.0.0-2vulnerable
Ubuntupg-partman24.045.0.1-1vulnerable
Ubuntupg-partman26.045.2.4-1vulnerable
Ubuntupg-partman26.045.3.1-2vulnerable
Ubuntupg-partman26.045.4.0-1vulnerable
Ubuntupg-partman26.045.4.1-1vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpg-partmansourcesid5.5.0-1not yet assignedNot reportedNot reported
Debianpg-partmansourceforky5.5.0-1not yet assignedNot reportedNot reported
Debianpg-partmansourcetrixie(unfixed)not yet assignedNot reportedNot reported
Debianpg-partmansourcebookworm(unfixed)not yet assignedNot reportedNot reported

Notes

[trixie] pg-partman: Minor issue [bookworm] pg-partman: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [pg-partman]

    Details (2)
    • 4.7.2-1 · amd64 · bookworm

      Affected

      nvd · pg-partman · debian · bookworm; nvd · pg-partman · debian · 12

    • 4.7.2-1 · arm64 · bookworm

      Affected

      nvd · pg-partman · debian · bookworm; nvd · pg-partman · debian · 12

[Debian 13 (Trixie)]

  • Source package: [pg-partman]

    Details (2)
    • 5.2.4-1 · amd64 · trixie

      Affected

      nvd · pg-partman · debian · 13

    • 5.2.4-1 · arm64 · trixie

      Affected

      nvd · pg-partman · debian · 13

Observed:

References