CVE-2026-61817: 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, run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time() interpolate the writable part_config.time_dncoder text value without identifier quoting into dynamic SQL. A role with the documented partman_user privileges can store SQL rather than a decoder function name. When an affected operation later uses the poisoned value, including pg_partman_bgw maintenance for a text- or UUID-keyed set, the SQL executes with the operation's privileges, which can be the default PostgreSQL superuser background-worker role. The persistent row can restore elevated access on later 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.
AI Analysis
Technical Summary
The vulnerability exists in pg_partman versions before 5.5.0 in functions run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time(). These functions interpolate the writable part_config.time_dncoder text value without proper identifier quoting into dynamic SQL. A role with partman_user privileges can inject SQL code by storing malicious SQL instead of a decoder function name. When the affected operations execute, including background worker maintenance tasks, the injected SQL runs with elevated privileges, potentially the PostgreSQL superuser background-worker role. This persistent injection can lead to full database compromise and operating system command execution as the PostgreSQL service account. The vulnerability is addressed in pg_partman version 5.5.0.
Potential Impact
Successful exploitation allows an attacker with partman_user privileges to execute arbitrary SQL commands with elevated privileges, including the PostgreSQL superuser background-worker role. This can result in complete compromise of the database and execution of operating system commands as the PostgreSQL service account, posing a critical risk to data confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade pg_partman to version 5.5.0 or later, where this SQL injection vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 5.5.0.
CVE-2026-61817: 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, run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time() interpolate the writable part_config.time_dncoder text value without identifier quoting into dynamic SQL. A role with the documented partman_user privileges can store SQL rather than a decoder function name. When an affected operation later uses the poisoned value, including pg_partman_bgw maintenance for a text- or UUID-keyed set, the SQL executes with the operation's privileges, which can be the default PostgreSQL superuser background-worker role. The persistent row can restore elevated access on later 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.
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
The vulnerability exists in pg_partman versions before 5.5.0 in functions run_maintenance(), show_partitions(), show_partition_info(), undo_partition(), and partition_data_time(). These functions interpolate the writable part_config.time_dncoder text value without proper identifier quoting into dynamic SQL. A role with partman_user privileges can inject SQL code by storing malicious SQL instead of a decoder function name. When the affected operations execute, including background worker maintenance tasks, the injected SQL runs with elevated privileges, potentially the PostgreSQL superuser background-worker role. This persistent injection can lead to full database compromise and operating system command execution as the PostgreSQL service account. The vulnerability is addressed in pg_partman version 5.5.0.
Potential Impact
Successful exploitation allows an attacker with partman_user privileges to execute arbitrary SQL commands with elevated privileges, including the PostgreSQL superuser background-worker role. This can result in complete compromise of the database and execution of operating system commands as the PostgreSQL service account, posing a critical risk to data confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade pg_partman to version 5.5.0 or later, where this SQL injection vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 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: 6aad98c355bf5e2cf57b8893
Added to database: 09/18/2026, 20:02:11 UTC
Last enriched: 09/18/2026, 20:17:42 UTC
Last updated: 09/18/2026, 22:12:51 UTC
Views: 3
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.