Vulnerabilities/

CVE-2026-61781

CVE

CVE-2026-61781

pg_partman has privilege escalation through SQL injection in create_partition_time()

Severity

Critical

Base CVSS

9.9

Fixed in

ba9405542acf24dd881845b935cab8b165854361,5.5.0-1

Description

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.

Severity scores

Source

Severity

Base score

CVSS version

Score vector

NVD

Critical

9.9

3.1

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

OSV

0

3.1

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Endor Labs

Required action

Known ransomware campaign use

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

Basic information

Base CVSS

9.9

EPSS probability

0.0

EPSS percentile

0.48764

Introduced version

0

Fix available

ba9405542acf24dd881845b935cab8b165854361,5.5.0-1

Endor Patches

Fix critical vulnerabilities instantly

Secure your app without upgrading: detect a compatible fix, apply safe remediation, and ship it in a single pull request.

Fix without upgrading

Get a demo of Endor Labs today.