Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege tenant with pg_monitor
-
DeliveryOperator reconciles managed role, issuing ALTER ROLE with cleartext password
-
ExploitQuery pg_stat_statements to extract cleartext credential
-
ExecutionReconnect to PostgreSQL as recovered superuser or app-owner
-
PersistExecute OS commands inside database pod via COPY FROM PROGRAM
-
ImpactAchieve full pod-level compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V6 - Authentication Credential storage protection
|
| Exploitation Conditions | Exploitation requires all three of the following conditions simultaneously: (1) pg_stat_statements must be listed in PostgreSQL's shared_preload_libraries AND track_utility must be set to on - track_utility is off by default in many distributions, making this a non-default configuration; (2) the attacking tenant must hold the pg_monitor or pg_read_all_stats built-in role, which is commonly granted in multi-tenant clusters for observability; (3) a managed-role password reconciliation event must occur after the attacker gains their pg_monitor privilege so that the ALTER/CREATE ROLE statement appears in pg_stat_statements query history. Exploitation is further limited to clusters NOT using SCRAM-SHA-256 or MD5 verifiers in managed-role Secrets - clusters supplying pre-hashed passwords were never vulnerable. Superuser TCP access must be reachable from the tenant's connection to complete the lateral-movement step. Authentication is required at PR:L - the attacker must already be an authenticated PostgreSQL tenant. |
| Impact | The CVSS 8.5 score with vector AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H accurately reflects both the severity and the non-trivial prerequisites. AC:H is correct: three conditions must converge - pg_stat_statements must be in shared_preload_libraries, track_utility must be enabled (it is not the default), and the attacking tenant must hold pg_monitor or pg_read_all_stats. S:C and C/I/A:H are fully justified because COPY FROM PROGRAM executes OS-level commands inside the database pod, escaping the PostgreSQL trust boundary entirely. Clusters using SCRAM-SHA-256 verifiers in managed-role Secrets were explicitly not affected, which narrows the real-world population further. No EPSS data is provided in the input; given the specific configuration prerequisites and the absence of KEV listing, real-world exploitation risk is lower than the raw score implies, but the potential impact for affected configurations is catastrophic (full pod takeover with superuser credential reuse). The multi-tenant Kubernetes context elevates priority: shared clusters where different teams hold pg_monitor for observability are a common enterprise pattern, making the pg_monitor vector more realistic than it might appear. No data conflicts are present in the available sources; the vendor advisory, PR diff, and affected-version ranges are internally consistent. |
| Exploit ScenarioDerived | A tenant in a shared Kubernetes PostgreSQL cluster holds the pg_monitor role granted for observability purposes. The cluster runs an unpatched CloudNativePG operator with pg_stat_statements loaded and track_utility=on. When the operator reconciles a managed role and calls ALTER ROLE app_owner WITH PASSWORD 'secret123', that literal SQL is captured by pg_stat_statements. The tenant queries SELECT query FROM pg_stat_statements WHERE query ILIKE '%ALTER ROLE%' to recover the cleartext password, then reconnects to PostgreSQL as app_owner or postgres, and issues COPY shell_cmd FROM PROGRAM 'id; cat /etc/passwd' to execute arbitrary commands inside the database pod. No public exploit code has been identified at time of analysis, but the technique requires only standard PostgreSQL client tooling. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Cleartext password exposure in CloudNativePG's PostgreSQL role management allows an authenticated low-privilege tenant to escalate to full operating-system command execution inside the database pod. Versions prior to 1.28.4, 1.29.2, and 1.30.0 embed raw cleartext passwords directly in ALTER ROLE and CREATE ROLE SQL statements; when pg_stat_statements is preloaded with track_utility=on, any tenant granted pg_monitor or pg_read_all_stats can harvest those credentials from query history. With the recovered superuser or application-owner password, the attacker reconnects and leverages PostgreSQL's COPY ... FROM PROGRAM to run arbitrary OS commands, achieving full cluster-pod compromise. No public exploit identified at time of analysis, but the attack chain is mechanically straightforward once prerequisites are met.
RemediationAI
Upgrade CloudNativePG to version 1.28.4 (for 1.28.x deployments), 1.29.2 (for 1.29.x deployments), or 1.30.0, all of which implement operator-side SCRAM-SHA-256 encoding before issuing CREATE/ALTER ROLE statements. Release artifacts are available at https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.28.4, https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.29.2, and https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.30.0. If immediate upgrade is not possible, the most effective compensating control is to set password_encryption = scram-sha-256 on affected clusters and rotate all managed-role passwords using SCRAM-formatted verifiers in the Kubernetes Secrets - this causes the operator to forward the verifier unchanged rather than interpolating cleartext, eliminating the exposure without operator upgrade. A secondary control is disabling track_utility in pg_stat_statements configuration (set pg_stat_statements.track_utility = off), which prevents DDL statement text from being recorded; this has the trade-off of reducing DDL auditing visibility. Revoking pg_monitor and pg_read_all_stats from all untrusted tenant roles eliminates the credential-recovery vector but may break legitimate observability workflows. Superuser TCP access (listen_addresses accepting external connections) should be restricted as defense-in-depth, as it is a required step for the attacker to leverage recovered superuser credentials.
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 (CPE: cpe:2.3:a:cloudnative-pg:cloudnative-pg:*:*:*:*:*:*:*:*) is a Kubernetes operator that manages PostgreSQL lifecycle, including declarative role and password management. The operator constructs SQL DDL statements - CREATE ROLE and ALTER ROLE with a PASSWORD clause - in two source files: pkg/management/postgres/utils/roles.go (SetUserPassword) and internal/management/controller/roles/postgres.go (appendPasswordOption). Prior to the fix, these functions interpolated plaintext password values directly into the SQL string rather than pre-hashing them client-side. CWE-256 (Plaintext Storage of a Password) captures the root cause: the secret material was never encoded before being written into a SQL statement that PostgreSQL's internal telemetry infrastructure could observe. The pg_stat_statements extension, when loaded as a shared_preload_library and configured with track_utility=true, records the literal text of utility statements - including ALTER/CREATE ROLE - making the embedded cleartext recoverable by any role holding pg_monitor or pg_read_all_stats. The fix (PR #10724) implements operator-side SCRAM-SHA-256 encoding of cleartext passwords before SQL emission, matching the approach used by psql's \password command and libpq's PQencryptPasswordConn, so PostgreSQL receives only the verifier hash rather than the secret.
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
AV:N because the tenant accesses PostgreSQL over the network; AC:H because pg_stat_statements with track_utility=on is a non-default configuration; PR:L because pg_monitor requires prior authenticated DB access; S:C because COPY FROM PROGRAM crosses into OS scope; C/I/A:H for full pod-level command execution.
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 embedded cleartext role passwords in ALTER ROLE and CREATE ROLE statements generated by SetUserPassword in pkg/management/postgres/utils/roles.go and appendPasswordOption in internal/management/controller/roles/postgres.go. When pg_stat_statements was preloaded with track_utility enabled and an untrusted tenant held pg_monitor or pg_read_all_stats, the tenant could recover platform-managed superuser or application-owner passwords, reconnect through enabled superuser TCP access, and execute operating system commands in the database pod with COPY ... FROM PROGRAM. Clusters using SCRAM-SHA-256 verifiers in managed-role Secrets were not affected. This issue is fixed in versions 1.28.4, 1.29.2, and 1.30.0.
Articles & Coverage 1
Executive ViewAI
CloudNativePG versions prior to 1.28.4, 1.29.2, and 1.30.0 expose cleartext passwords in PostgreSQL query history, allowing authenticated users with monitoring privileges to escalate to operating-system command execution within database pods. Organizations running affected versions face risk of full cluster compromise and unrestricted access to customer data and systems.
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-256 – Plaintext Storage of a Password
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-63685
NVD
CVE.org
EPSS
GitHub
Exploit-DB