Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/cloudnative-pg/cloudnative-pg
  4. ›
  5. CVE-2026-44477

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

May 11, 2026

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. That residual superuser identity is the foothold for the rest of the chain.

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.

Two exploitation paths follow from this root cause.

References

  • github.com/advisories/GHSA-423p-g724-fr39
  • github.com/cloudnative-pg/cloudnative-pg/pull/10576
  • github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.28.3
  • github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.29.1
  • github.com/cloudnative-pg/cloudnative-pg/security/advisories/GHSA-423p-g724-fr39
  • nvd.nist.gov/vuln/detail/CVE-2026-44477

Code Behaviors & Features

Detect and mitigate CVE-2026-44477 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.28.3, all versions starting from 1.29.0 before 1.29.1

Fixed versions

  • 1.28.3
  • 1.29.1

Solution

Upgrade to versions 1.28.3, 1.29.1 or above.

Impact 9.9 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-250: Execution with Unnecessary Privileges
  • CWE-271: Privilege Dropping / Lowering Errors
  • CWE-426: Untrusted Search Path

Source file

go/github.com/cloudnative-pg/cloudnative-pg/CVE-2026-44477.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 06 Jun 2026 00:18:45 +0000.