CVE-2026-55769: CloudNativePG: Overriding operators can lead to privilege escalation in CloudNativePG for SQL queries without a fixed `search_path`
CloudNativePG is a platform designed to manage PostgreSQL databases within Kubernetes environments. Prior to 1.28.4 and 1.29.2, CloudNativePG opened superuser connections without pinning searchpath in fillDefaultParameters in pkg/management/postgres/pool/profiles.go. A role holding DATABASE OWNER could create overloaded built-in operators in the public schema and change the database or role searchpath, causing instance-manager introspection queries such as SELECT COUNT() > 0 FROM pgcatalog.pgextension WHERE extname = $1 to execute attacker-controlled functions as the postgres superuser. The same trust issue affected direct sql.Open("pgx", ...) callsites and the public.usersearch SECURITY DEFINER function, enabling PostgreSQL superuser access, operating system command execution through COPY ... FROM PROGRAM, and access to the pod ServiceAccount token. This issue is fixed in versions 1.28.4, 1.29.2, and 1.30.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
CloudNativePGto a version that resolves this vulnerability.Fixed in 1.28.4 - Upgrade
Upgrade
CloudNativePGto a version that resolves this vulnerability.Fixed in 1.29.2 - Upgrade
Upgrade
CloudNativePGto a version that resolves this vulnerability.Fixed in 1.30.0
Event History
Frequently Asked Questions
Which database roles can exploit this issue?
A role that holds DATABASE OWNER can exploit the issue by creating overloaded built-in operators in the public schema and changing the database or role search_path.
What level of access can successful exploitation provide?
Successful exploitation can cause attacker-controlled functions to run as the PostgreSQL postgres superuser. This can lead to PostgreSQL superuser access, operating system command execution through COPY ... FROM PROGRAM, and access to the pod ServiceAccount token.
Are deployments using the public.user_search SECURITY DEFINER function affected?
Yes. The same search_path trust issue affected the public.user_search SECURITY DEFINER function, as well as direct sql.Open("pgx", ...) callsites.
Which releases contain the fix?
The issue is fixed in CloudNativePG 1.28.4, 1.29.2, and 1.30.0.