Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain partman_user database access
-
DeliveryStore malicious SQL in part_config.time_encoder
-
ExploitPrivileged role invokes undo_partition()
-
ExecutionInjected SQL runs with caller privileges
-
ImpactRead/modify/destroy data beyond attacker grants
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated role with partman_user access to write to the part_config.time_encoder column (PR:L), plus a separate, more-privileged role that subsequently invokes undo_partition() on the affected partition set - this confused-deputy dependency is what makes exploitation AC:H. Impact is bounded by the invoking caller's privileges, not the attacker's, and does NOT include the automatic superuser escalation of the related BGW create-partition flaw because undo_partition() is outside the default background-worker path. Affected only in pg_partman prior to 5.5.0; environments already using RLS on part_config or a non-superuser maintainer role reduce exposure. |
| Impact | This is a genuine SQL injection / privilege-escalation flaw (CWE-89) in pg_partman's undo_partition(), but it sits below its more dangerous sibling CVE-2026-61781. The vendor CVSS 3.1 vector (AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H, 8.5) correctly captures that exploitation is authenticated (PR:L - requires partman_user access) and high-complexity (AC:H). Crucially, the description states undo_partition() is NOT part of the default background-worker path, so the automatic superuser escalation that made CVE-2026-61781 a 9.9 does NOT apply here - the injected SQL runs only with the privileges of whichever role invokes undo_partition(), making this a confused-deputy issue rather than guaranteed superuser compromise. I therefore dispute S:C: the injection and its effects remain within a single PostgreSQL security authority, so S:U is more defensible, lowering my independent estimate to ~7.5. There is no EPSS score, no CISA KEV listing, and no public proof-of-concept in the provided intelligence - no public exploit identified at time of analysis. Realistic risk is moderate: it requires an existing partman_user foothold plus a more-privileged victim caller invoking undo_partition() on the poisoned config, so this is a defense-in-depth / insider or post-compromise escalation concern rather than a mass-exploitation priority. |
| Exploit ScenarioDerived | An attacker who holds partman_user access in a multi-tenant PostgreSQL database stores crafted SQL (instead of a legitimate function name) in the part_config.time_encoder column. When a more privileged role later invokes undo_partition() on that partition set, the interpolated SQL executes with that caller's privileges, letting the attacker read, modify, or destroy data beyond their own grants. No public exploit code is identified in the provided data, and the AC:H rating reflects the dependency on a privileged victim triggering the function. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 18, 2026
SQL injection in pg_partman prior to 5.5.0 lets a role with partman_user access store arbitrary SQL - rather than a legitimate function name - in the part_config.time_encoder column, which undo_partition() interpolates into a dynamically executed SELECT without identifier quoting and runs with the privileges of whichever caller invokes that function. Exploitation is a two-step confused-deputy chain: an authenticated writer plants the payload, and a separate more-privileged role must later call undo_partition() on the same partition set, which is why the assessed vector is AV:N/AC:H/PR:L with impact bounded by the invoking caller rather than the attacker, and it does not carry the automatic superuser escalation of the background-worker create-partition flaw. No public exploit code and no confirmed active exploitation were identified at time of analysis, and the issue is resolved in pg_partman 5.5.0.
RemediationAI
Upgrade pg_partman to the fixed release: Vendor-released patch: 5.5.0, available from the v5.5.0 tag (https://github.com/pgpartman/pg_partman/releases/tag/v5.5.0) and the fixing commit ba9405542acf24dd881845b935cab8b165854361 (https://github.com/pgpartman/pg_partman/commit/ba9405542acf24dd881845b935cab8b165854361); after installing the new extension files, run ALTER EXTENSION pg_partman UPDATE so the corrected undo_partition() definition is actually loaded. Until the upgrade can be scheduled, the highest-value compensating control is to revoke blanket partman_user privileges and restrict INSERT/UPDATE on part_config and part_config_sub so that tenant roles cannot write arbitrary text into time_encoder - the trade-off is that maintenance workflows relying on those grants must be adjusted, and per-set ownership must be granted explicitly instead. Enable Row Level Security on part_config and part_config_sub using the maintenance_role column added in 5.5.0 so each role can only touch partition sets it owns; RLS enforcement requires 5.5, though moving pg_partman_bgw.role off a superuser can be done before upgrading. The vendor also changed the default pg_partman_bgw.role GUC to the arbitrary non-superuser role partman_maintainer in 5.5.0 - a breaking change that will make the background worker throw errors until that role exists with the required privileges, but which substantially reduces the blast radius of the related dynamic-SQL flaws; if the parameter was previously set to postgres or another superuser, change it to a non-superuser maintainer role and GRANT the owning roles (e.g. GRANT table_owner_alpha TO partman_maintainer) per the updated README setup and privilege documentation. Finally, audit part_config.time_encoder and part_config_sub values for any entry that is not a plain function name, since a maliciously or accidentally planted value would remain exploitable until corrected.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pg_partman is a PostgreSQL extension that manages time- or ID-based partitioned tables and stores its configuration in the part_config and part_config_sub tables. CVE-2026-61818 is a CWE-89 SQL injection rooted in unsafe dynamic SQL construction: undo_partition() reads part_config.time_encoder as unrestricted text and interpolates it directly into a dynamically prepared SELECT statement without identifier quoting, so any value that parses as SQL is executed instead of being treated as a function name. Because EXECUTE of a dynamic string runs in the security context of the current session, the planted SQL inherits the privileges of the role that calls undo_partition() - a privilege-escalation/confused-deputy pattern rather than a direct privilege gain for the writer. The extension's exposure scope is defined by CPE cpe:2.3:a:pgpartman:pg_partman:*:*:*:*:*:*:*:* (all releases before 5.5.0). This CVE is one of a cluster fixed in the same release: CVE-2026-61781, CVE-2026-61817 and CVE-2026-61818 cover time encoder/decoder dynamic SQL, CVE-2026-61819 covers the pg_jobmon integration, CVE-2026-61820 covers property inheritance from the template table, CVE-2026-61821 covers retention-schema ownership takeover, and CVE-2026-61822 covers maintenance-run error propagation. Critically, undo_partition() is not part of the default background-worker maintenance path, so the automatic superuser escalation possible through BGW-driven partition creation is not reachable here; the vendor's 5.5.0 hardening nonetheless changed the pg_partman_bgw.role GUC default to the non-superuser role partman_maintainer and added a maintenance_role column to support Row Level Security on the configuration tables.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Authenticated partman_user (PR:L) and a required privileged second caller make it AC:H; injection stays within one DB authority so S:U, but a high-privileged caller yields full C/I/A.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
Evidence note: the supplied material is the GitHub Security Advisory (GHSA-fm3m-9fh7-mqfc) only.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Organizations running the PostgreSQL partitioning extension pg_partman at versions prior to 5.5.0 are exposed to a privilege-boundary weakness in which a low-privileged database account (one holding partman_user) can store malicious SQL where a function name is expected, and that payload later executes with the full database rights of a more privileged user who simply runs a routine maintenance function. Because the code executes as the invoking caller rather than as a superuser automatically, the blast radius depends on which internal team member or service account next calls that function - meaning an unmonitored routine maintenance operation can silently execute attacker-supplied statements against production data. Leadership should care because this undermines the database least-privilege model that segregation between application roles and administration roles is built on, and no public exploit code or confirmed active exploitation was identified at time of analysis.
Metadata provided indicates no vendor-released patch at time of analysis, so interim controls are required until the fix in pg_partman 5.5.0 is deployed: revoke partman_user and all write privileges on part_config from non-admin roles, restrict EXECUTE on undo_partition() and related functions to named administrative accounts, audit and clean existing part_config.time_encoder values, and monitor for suspicious changes to that column; apply vendor patch (pg_partman 5.5.0) as the permanent remediation once available for your distribution.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-83427
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB