SecurityContext

CVE-2026-61781: pg_partman - Command Injection

  • Cve: CVE-2026-61781
  • Name: pg_partman - Command Injection
  • Description: pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, create_partition_time() reads the writable part_config.time_encoder text value and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with the documented partman_user INSERT and UPDATE privileges can store SQL rather than a function name. When pg_partman_bgw later creates a child partition for a text- or UUID-keyed set, the worker executes the stored SQL with pg_partman_bgw.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.
  • Impact: Attackers with partman_user privileges can execute arbitrary SQL and OS commands as the PostgreSQL service account, leading to full database and system compromise.
  • Remediation: Update to version 5.5.0 or later.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution, privilege_escalation
  • Requirement type: logged_in
  • Requirements: Attacker must have partman_user INSERT and UPDATE privileges
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.9
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Epss score: 0.00804
  • Epss percentile: 0.57493
  • Assignee: [email protected]
  • Published at: 2026-09-18T20:17:19Z
  • Age in days: 67
  • Modified at: 2026-09-23T18:12:04Z
  • References total: 3
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-61781
  • Nvd status: awaiting_analysis
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-89Improper Neutralization of Special Elements used in an SQL Command

References

Same in every row:

  • Source: nvd
  • Tags:
Url
https://github.com/pgpartman/pg_partman/commit/ba9405542acf24dd881845b935cab8b165854361
https://github.com/pgpartman/pg_partman/releases/tag/v5.5.0
https://github.com/pgpartman/pg_partman/security/advisories/GHSA-742w-3j7c-qwvp

Projects

RepositoryLink kindsIndexedUrl
pgpartman/pg_partmancommit, fix, releases, security_advisoryyes/v1/repositories/pgpartman/pg_partman

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts