{"id":"CVE-2026-44477","published":"2026-05-28T15:46:12Z","modified":"2026-07-15T00:54:01Z","title":"CloudNativePG: Metrics exporter allows privilege escalation to PostgreSQL superuser and OS RCE","vendor":"cloudnative-pg","product":"cloudnative-pg","tier":"tail","description":{"text":"CloudNativePG is a platform designed to manage PostgreSQL databases within Kubernetes environments. Prior to 1.29.1 and 1.28.3, the CloudNativePG metrics exporter opens its PostgreSQL connection as the postgres superuser via the pod-local Unix socket, then demotes the session with SET ROLE pg_monitor. SET ROLE changes only current_user; session_user remains postgres. Any SQL expression evaluated inside the scrape session can invoke RESET ROLE to recover real superuser privileges, then use COPY ... TO PROGRAM to spawn an OS-level subprocess as the postgres user inside the primary pod. The READ ONLY transaction flag does not block this; it gates writes to database state, not external processes. This vulnerability is fixed in 1.29.1 and 1.28.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0048,"percentile":0.42343,"provenance":"source"},"cwes":[{"id":"CWE-250","name":"Execution with Unnecessary Privileges"},{"id":"CWE-271","name":"Privilege Dropping / Lowering Errors"},{"id":"CWE-426","name":"Untrusted Search Path"}],"references":[{"url":"https://github.com/cloudnative-pg/cloudnative-pg/security/advisories/GHSA-423p-g724-fr39","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cloudnative-pg/cloudnative-pg/pull/10576","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-44477","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2482763","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44477.json","tags":["x_sadp-csaf-vex"]}],"priority":{"score":15.0,"factors":[{"name":"EPSS percentile","points":8.47},{"name":"CVSS severity","points":6.58}]},"vendorSlug":"cloudnative-pg","affectedVersions":[{"vendor":"cloudnative-pg","product":"cloudnative-pg","versions":["< 1.28.3",">= 1.29.0, < 1.29.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-05-28T17:28:36.663338Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/cloudnative-pg/cloudnative-pg","vulnerableRanges":["<1.28.3",">=1.29.0, <1.29.1"],"patched":["1.28.3","1.29.1"],"from":["GHSA-423p-g724-fr39","GO-2026-5106"],"provenance":"source"}],"summary":{"text":"CloudNativePG, a platform for managing PostgreSQL databases in Kubernetes, has a flaw in its metrics exporter, which opens its PostgreSQL connection as the postgres superuser and only drops to the pg_monitor role with SET ROLE, which leaves the session user as postgres. An attacker with network access and low-privilege authentication can run SQL in the scrape session, use RESET ROLE to regain superuser rights, and use COPY ... TO PROGRAM to run OS commands as the postgres user inside the primary pod, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:28:13Z"},"euvd":{"id":"EUVD-2026-32930","exploited":false,"provenance":"source"}}