REDHAT-BUG-2482763: High severity CloudNativePG CloudNativePG metrics exporter vulnerability

Published May 28, 2026
·
Updated

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 pgmonitor. SET ROLE changes only currentuser; sessionuser 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.

Affected Software

1 affected component
CloudNativePG CloudNativePG metrics exporter>0<=1.29.0, >0<=1.28.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade CloudNativePG to a version that resolves this vulnerability.

    Fixed in 1.29.1
  2. Upgrade

    Upgrade CloudNativePG to a version that resolves this vulnerability.

    Fixed in 1.28.3

Event History

May 28, 2026
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which CloudNativePG versions are affected?

CloudNativePG versions prior to 1.29.1 and 1.28.3 are affected. The issue is fixed in 1.29.1 and 1.28.3.

2

What would an attacker need to exploit this issue?

An attacker would need a way to have a SQL expression evaluated within a metrics scrape session. From that session, they can use RESET ROLE to regain the postgres superuser privileges retained as session_user.

3

What is the impact after successful exploitation?

The attacker can use COPY ... TO PROGRAM to start an operating-system subprocess as the postgres user inside the primary pod. The scrape transaction being marked READ ONLY does not prevent this because it does not restrict external process execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203