Execution with Unnecessary Privileges Affecting cloudnative-pg package, versions <1.29.1-r0


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-WOLFILATEST-CLOUDNATIVEPG-16711897
  • published16 May 2026
  • disclosed28 May 2026

Introduced: 16 May 2026

NewCVE-2026-44477  (opens in a new tab)
CWE-250  (opens in a new tab)
CWE-271  (opens in a new tab)
CWE-426  (opens in a new tab)

How to fix?

Upgrade Wolfi cloudnative-pg to version 1.29.1-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream cloudnative-pg package and not the cloudnative-pg package as distributed by Wolfi. See How to fix? for Wolfi relevant fixed versions and status.

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.