CVE-2026-61818: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in pgpartman pg_partman
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, undo_partition() reads part_config.time_encoder as unrestricted text and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with partman_user access can store SQL rather than a function name, and the SQL executes with the privileges of the caller that invokes undo_partition(). The function is not part of the default background-worker path, which limits the automatic superuser escalation described by the related create-partition vulnerability, but a privileged caller can still have its available confidentiality, integrity, and availability permissions abused. This issue is fixed in version 5.5.0.
AI Analysis
Technical Summary
pg_partman is a PostgreSQL extension for managing partitioned tables. In versions prior to 5.5.0, the undo_partition() function reads the part_config.time_encoder parameter as unrestricted text and interpolates it directly into a dynamically executed SELECT statement without identifier quoting. This improper neutralization of special elements leads to an SQL injection vulnerability (CWE-89). A user with partman_user role access can supply SQL code instead of a function name, causing arbitrary SQL execution with the privileges of the caller. The vulnerability does not affect the default background-worker path, which limits automatic superuser privilege escalation, but still allows abuse of the caller's permissions. The vulnerability is addressed by an official fix in version 5.5.0.
Potential Impact
Successful exploitation allows a user with partman_user role access to execute arbitrary SQL commands with the privileges of the caller invoking undo_partition(). This can lead to unauthorized disclosure, modification, or deletion of data, impacting confidentiality, integrity, and availability of the database. The vulnerability does not automatically escalate privileges to superuser but can be leveraged to abuse the permissions of the invoking role.
Mitigation Recommendations
Upgrade pg_partman to version 5.5.0 or later, where this SQL injection vulnerability is fixed. No other mitigations are specified. Patch status is confirmed by the vendor advisory indicating the fix in version 5.5.0.
CVE-2026-61818: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in pgpartman pg_partman
Description
pg_partman is a PostgreSQL extension that manages partitioned tables by time or ID. Prior to 5.5.0, undo_partition() reads part_config.time_encoder as unrestricted text and interpolates it without identifier quoting into a dynamically executed SELECT statement. A role with partman_user access can store SQL rather than a function name, and the SQL executes with the privileges of the caller that invokes undo_partition(). The function is not part of the default background-worker path, which limits the automatic superuser escalation described by the related create-partition vulnerability, but a privileged caller can still have its available confidentiality, integrity, and availability permissions abused. This issue is fixed in version 5.5.0.
CVSS v3.1
Score 8.5high
Affected software
pgpartman
pg_partman
pkg:github/pgpartman/pg_partmanRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
pg_partman is a PostgreSQL extension for managing partitioned tables. In versions prior to 5.5.0, the undo_partition() function reads the part_config.time_encoder parameter as unrestricted text and interpolates it directly into a dynamically executed SELECT statement without identifier quoting. This improper neutralization of special elements leads to an SQL injection vulnerability (CWE-89). A user with partman_user role access can supply SQL code instead of a function name, causing arbitrary SQL execution with the privileges of the caller. The vulnerability does not affect the default background-worker path, which limits automatic superuser privilege escalation, but still allows abuse of the caller's permissions. The vulnerability is addressed by an official fix in version 5.5.0.
Potential Impact
Successful exploitation allows a user with partman_user role access to execute arbitrary SQL commands with the privileges of the caller invoking undo_partition(). This can lead to unauthorized disclosure, modification, or deletion of data, impacting confidentiality, integrity, and availability of the database. The vulnerability does not automatically escalate privileges to superuser but can be leveraged to abuse the permissions of the invoking role.
Mitigation Recommendations
Upgrade pg_partman to version 5.5.0 or later, where this SQL injection vulnerability is fixed. No other mitigations are specified. Patch status is confirmed by the vendor advisory indicating the fix in version 5.5.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-10T20:17:57.992Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6aad98c355bf5e2cf57b8894
Added to database: 09/18/2026, 20:02:11 UTC
Last enriched: 09/18/2026, 20:17:37 UTC
Last updated: 09/19/2026, 01:49:22 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.