CVE-2026-61819: pg_partman privilege escalation via SQL injection in when using pg_jobmon and encountering exception

Published Sep 18, 2026
·
Updated

pgpartman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, when pgjobmon is installed and partconfig.jobmon is true, exception handlers in multiple pgpartman functions place pparenttable verbatim inside a SQL string literal used to call pgjobmon.addjob(). A partmanuser can create a parent-table name containing a single quote that terminates the literal and injects SQL when an affected exception path runs. If pgpartmanbgw reaches that path, the injected SQL executes with pgpartmanbgw.role privileges, which default to PostgreSQL superuser, permitting database-wide compromise and operating-system command execution as the PostgreSQL service account. The persistent partconfig row can trigger the escalation again on later maintenance ticks. This issue is fixed in version 5.5.0.

Affected Software

1 affected component
PostgreSQL pg_partman<5.5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pg_partman to a version that resolves this vulnerability.

    Fixed in 5.5.0

Event History

Sep 18, 2026
CVE Published
via MITRE·07:50 PM
Data Sourced
via MITRE·07:50 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Exposure requires pg_partman versions before 5.5.0, pg_jobmon to be installed, and part_config.jobmon to be true. The escalation occurs when an affected exception path is reached by pg_partman_bgw.

2

What access does an attacker need to exploit this?

An attacker needs partman_user access sufficient to create a parent-table name containing a single quote. They also need an affected exception path to run so that the background worker processes the malicious configuration.

3

How serious is compromise through the background worker?

Injected SQL can execute with pg_partman_bgw.role privileges. That role defaults to PostgreSQL superuser, which can allow database-wide compromise and operating-system command execution as the PostgreSQL service account.

4

What can be done before upgrading?

Upgrade to version 5.5.0 when possible. Until then, avoid the vulnerable condition by ensuring pg_jobmon is not installed or that part_config.jobmon is not enabled for pg_partman configurations.

5

How can administrators look for possible exploitation?

Review persistent part_config entries that have jobmon enabled, especially entries associated with unusual parent-table names containing single quotes. A malicious configuration row can trigger the escalation again during later maintenance ticks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203