Skip to main content

CVE-2026-61817: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in pgpartman pg_partman

0
High
VulnerabilityCVE-2026-61817cvecve-2026-61817cwe-89
Published: 09/18/2026 (09/18/2026, 19:48:22 UTC)
Source: CVE Database V5
Vendor/Project: pgpartman
Product: 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

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Affected software

pgpartman

pg_partman

Affected versions
<5.5.0
GitHub Actionsmore threats →ai
pgpartman/pg_partman
pkg:github/pgpartman/pg_partman
Affected versions
<5.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/18/2026, 20:17:42 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses