CVE-2026-61819
8.5pgpartman · pg_partman
A SQL injection vulnerability in the pg_partman PostgreSQL extension allows authenticated users to achieve database-wide compromise and remote code execution via malicious table names.
Executive summary
A high-severity SQL injection vulnerability in pg_partman allows authenticated users to escalate privileges to superuser and execute arbitrary operating system commands.
Vulnerability
The vulnerability stems from improper neutralization of SQL command elements in exception handlers, where parent table names are concatenated into SQL strings. An authenticated user with sufficient permissions to create tables can inject malicious SQL, which executes with the privileges of the pg_partman background worker, typically defaulting to a PostgreSQL superuser.
Business impact
Successful exploitation leads to a complete compromise of the database environment and the underlying host server. Because the injected code runs with superuser privileges, an attacker can exfiltrate sensitive data, modify database records, or achieve persistent command execution on the host operating system. Given the CVSS score of 8.5, this vulnerability represents a critical threat to data integrity and infrastructure security.
Remediation
Immediate Action: Update the pg_partman extension to version 5.5.0 or later immediately to apply the required input sanitization.
Proactive Monitoring: Review PostgreSQL logs for suspicious table creation activities or anomalous SQL syntax errors that may indicate an attempt to trigger exception handlers.
Compensating Controls: Restrict database user permissions to prevent unauthorized users from creating new partitioned tables or modifying pg_partman configuration settings until the update is applied.
Exploitation status
Public Exploit Available: No
Analyst recommendation
The potential for privilege escalation to superuser status makes this vulnerability a priority for all database administrators. Organizations using pg_partman with pg_jobmon enabled should verify their current version immediately and proceed with the upgrade to 5.5.0 to eliminate this critical attack vector.
More pgpartman CVEs
History
- Disclosed CVE record published
- Collected by CVE Brief via github
- Analyst report written
- Published in the daily brief high section