CVE-2026-44477 CloudNativePG: Metrics exporter allows privilege escalation to PostgreSQL superuser and OS RCE

Critical 9.4 Published Updated

Attackers can escalate privileges to PostgreSQL superuser and execute OS commands by exploiting improper role demotion in the metrics exporter.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-44477?

CVE-2026-44477 is a critical vulnerability in cloudnative-pg, published on 28 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-426, CWE-271, CWE-250

Which versions are affected by CVE-2026-44477?

5 open source packages ship an affected version, including github.com/cloudnative-pg/cloudnative-pg. It affects 1 product.

PackageAffectedFixed in
github.com/cloudnative-pg/cloudnative-pg GoAll versions1.28.3, 1.29.1
github.com/cloudnative-pg/cloudnative-pg GoAll versions1.28.3
github.com/cloudnative-pg/cloudnative-pg GoAll versions1.28.3
github.com/cloudnative-pg/cloudnative-pg GoFrom 1.29.01.29.1
github.com/cloudnative-pg/cloudnative-pg GoFrom 1.29.01.29.1

Products include Linuxfoundation Cloudnativepg.

How do I fix CVE-2026-44477?

Upgrade github.com/cloudnative-pg/cloudnative-pg to a fixed version for your release line: 1.28.3 or 1.29.1.

Is CVE-2026-44477 being exploited?

There is no known exploitation of CVE-2026-44477 in the wild and no public exploit code.

Sources

Also known as GHSA-423p-g724-fr39, GO-2026-5106, MINI-65wx-h36c-mf6j, MINI-8qcj-4fpw-qhjq, MINI-c7rg-37g5-6hq2, MINI-cxq5-2g7f-hfcc and 3 more.

Is CVE-2026-44477 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free