Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate as DATABASE OWNER tenant
-
DeliveryPlant overloaded operator in public schema
-
ExploitSet role/database search_path to public
-
InstallOperator introspection query resolves to planted function
-
C2Execute as postgres superuser
-
ExecuteCOPY FROM PROGRAM runs OS commands
-
ImpactSteal pod ServiceAccount token
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path verification
|
| Exploitation Conditions | Exploitation requires the attacker to already hold DATABASE OWNER (or an equivalent role able to CREATE objects in a writable schema such as public and to run ALTER DATABASE/ALTER ROLE ... SET search_path) on a database managed by a vulnerable CloudNativePG instance (< 1.28.4, or 1.29.0-1.29.1). The concrete prerequisites are: (1) the operator opening a superuser connection with an unpinned search_path - the default behavior before the fix; (2) a schema the attacker can write to (public by default) so an overloaded built-in operator/function can be planted; and (3) the tenant's ability to influence the connecting session's search_path. Limiting factors: this is authenticated (PR:L) - a purely external attacker with no database role cannot exploit it; it is most relevant in multi-tenant deployments where untrusted parties legitimately own databases, and is largely inert where only trusted operators hold DATABASE OWNER. No user interaction is required, and the trigger is passive (the operator's routine introspection query fires the payload). |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H, base 9.4) is credible and internally consistent with the description: network-reachable PostgreSQL, low attacker privileges (a legitimate DATABASE OWNER / tenant role), no user interaction, and high impact on both the vulnerable database and subsequent systems (the postgres OS process and the Kubernetes pod's ServiceAccount token). The high subsequent-system impact (SC/SI/SA:H) is well-justified because exploitation escapes the database boundary into OS command execution and cluster-credential theft. No EPSS score, KEV listing, or POC was provided, so this is a high-severity issue by mechanism rather than a confirmed widespread-exploitation event - real-world risk is highest in multi-tenant CloudNativePG deployments where untrusted parties legitimately own databases; in single-tenant clusters where only trusted operators hold DATABASE OWNER, the practical exposure is lower. The PR:L requirement is a genuine limiting factor: an attacker must already hold DATABASE OWNER (or equivalent) on a managed database, so this is a tenant-escalation / lateral-movement flaw, not remote-unauthenticated RCE. |
| Exploit ScenarioDerived | A tenant who holds DATABASE OWNER on a CloudNativePG-managed database sets a role- or database-level search_path pointing at the public schema and plants an overloaded operator/function there. When the instance-manager next runs an unqualified introspection query as the postgres superuser, the planted function executes with superuser rights, and the attacker chains COPY ... FROM PROGRAM to run OS commands in the pod and read the ServiceAccount token for further Kubernetes lateral movement. No public exploit identified at time of analysis, but the advisory and patch describe the technique in full detail. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Privilege escalation to PostgreSQL superuser and pod-level command execution in CloudNativePG before 1.28.4 and 1.29.2 lets a low-privileged tenant who holds DATABASE OWNER escape from database-level control to the postgres OS process. Because operator-issued superuser connections did not pin search_path, a tenant could plant overloaded built-in operators in the public schema and hijack instance-manager introspection queries so they run attacker-controlled code as the superuser, then reach OS command execution via COPY ... FROM PROGRAM and the pod's ServiceAccount token. This is CWE-426 (Untrusted Search Path), the same class as PostgreSQL's CVE-2018-1058; no public exploit identified at time of analysis, but the vendor patch and detailed advisory make the mechanism fully documented.
RemediationAI
Vendor-released patch: upgrade CloudNativePG to 1.28.4, 1.29.2, or 1.30.0, which pin the operator's search_path to 'pg_catalog, public, pg_temp' on every connection and automatically recreate the PgBouncer public.user_search SECURITY DEFINER function with its own pinned search_path during the first reconciliation after upgrade (see GHSA-x8c2-3p4r-v9r6 and release notes at https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.30.0). Note a functional side effect: custom monitoring queries now run inside a transaction with the pinned search_path, so any metric referencing objects in other user-defined schemas by unqualified name must be schema-qualified (e.g. myschema.mytable) or it will stop resolving; user-authored postInit* bootstrap and logical-import post-import SQL are unaffected. Where immediate patching is not possible, compensating controls are to stop granting DATABASE OWNER or CREATE on the public schema to untrusted tenants and to REVOKE CREATE ON SCHEMA public FROM PUBLIC on managed databases (trade-off: breaks tenants that legitimately create objects in public), audit databases for tenant-set search_path via ALTER DATABASE/ALTER ROLE, and treat multi-tenant clusters as exposed until upgraded.
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
CloudNativePG is a CNCF Kubernetes operator that provisions and manages PostgreSQL clusters; its instance-manager sidecar connects to PostgreSQL as the postgres superuser to run introspection and reconciliation queries. The root cause is CWE-426 Untrusted Search Path: fillDefaultParameters in pkg/management/postgres/pool/profiles.go opened superuser connections without pinning search_path, so operator sessions inherited any database- or role-level search_path set by a tenant via ALTER DATABASE/ALTER ROLE. PostgreSQL resolves unqualified names (including operators like the '>' used in SELECT COUNT(*) > 0 FROM pg_catalog.pg_extension WHERE extname = $1) through search_path, so a DATABASE OWNER could create an overloaded operator or function in the writable public schema that shadows the intended built-in and executes as the superuser. The same untrusted-search-path flaw affected direct sql.Open("pgx", ...) callsites and the public.user_search SECURITY DEFINER function used by the PgBouncer auth_query integration. The fix pins search_path to a fixed 'pg_catalog, public, pg_temp' on every operator connection (pg_catalog first so built-ins win, pg_temp last so it cannot shadow) and recreates the SECURITY DEFINER function with SET search_path = pg_catalog, pg_temp.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Attacker needs an existing low-privileged DATABASE OWNER role (PR:L) over a network-reachable database (AV:N/AC:L/UI:N); superuser and OS/ServiceAccount escape crosses the security boundary, so S:C with full C/I/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
CloudNativePG is a platform designed to manage PostgreSQL databases within Kubernetes environments. Prior to 1.28.4 and 1.29.2, CloudNativePG opened superuser connections without pinning search_path in fillDefaultParameters in pkg/management/postgres/pool/profiles.go. A role holding DATABASE OWNER could create overloaded built-in operators in the public schema and change the database or role search_path, causing instance-manager introspection queries such as SELECT COUNT(*) > 0 FROM pg_catalog.pg_extension WHERE extname = $1 to execute attacker-controlled functions as the postgres superuser. The same trust issue affected direct sql.Open("pgx", ...) callsites and the public.user_search SECURITY DEFINER function, enabling PostgreSQL superuser access, operating system command execution through COPY ... FROM PROGRAM, and access to the pod ServiceAccount token. This issue is fixed in versions 1.28.4, 1.29.2, and 1.30.0.
Articles & Coverage 2
Executive ViewAI
CloudNativePG versions before 1.28.4 and 1.29.2 contain a documented privilege escalation flaw (CVSS 9.4) that allows database users to gain pod-level control and access infrastructure credentials, though no public exploit code currently exists. Organizations running affected versions must patch immediately, as the vulnerability mechanism is fully detailed in vendor advisories and could enable insider threats or post-breach lateral movement.
Apply vendor patch.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Same weakness CWE-426 – Untrusted Search Path
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-63687
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB