CyberRota Analysis
AI-GeneratedThe pg_partman extension for PostgreSQL, prior to version 5.5.0, contains a vulnerability that allows an attacker to inject SQL commands through manipulated parent-table names, leading to potential database-wide compromise and operating-system command execution with superuser privileges. This issue arises when pg_jobmon is installed and part_config.jobmon is enabled, making it critical for users of pg_partman who have these configurations to prioritize upgrading to version 5.5.0 to mitigate the risk. Database administrators and security teams should act promptly to secure their systems against this high-severity vulnerability.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, when pg_jobmon is installed and part_config.jobmon is true, exception handlers in multiple pg_partman functions place p_parent_table verbatim inside a SQL string literal used to call pg_jobmon.add_job(). A partman_user can create a parent-table name containing a single quote that terminates the literal and injects SQL when an affected exception path runs. If pg_partman_bgw reaches that path, the injected SQL 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 persistent part_config row can trigger the escalation again on later maintenance ticks. This issue is fixed in version 5.5.0.