CVE-2026-96538: WarehousePG pg_file_write/pg_file_rename/pg_file_unlink/pg_logdir_ls privilege escalation
WarehousePG (WHPG) 7.x before 7.6.0-WHPG is affected by a missing authorization vulnerability (CWE-862) in the built-in server-side file functions pgfilewrite(text,text,bool), pgfilerename(text,text,text), pgfileunlink(text), and pglogdirls(). These functions are executable by any authenticated database role with no GRANT required, because the REVOKE that contrib/adminpack applies to the equivalent functions was never carried over to WHPG core when their catalog entries were repointed to the ungated adminpack-derived implementations as part of Greenplum's merge to a PostgreSQL 12 base. A non-superuser can use pgfilewrite, pgfilerename, and pgfileunlink to create, overwrite (append), rename, and delete files under the data and log directories, and can use pglogdirls() to enumerate log file names. Because postgresql.auto.conf resides in the data directory, a non-superuser can append configuration directives such as sharedpreloadlibraries or archivecommand to it, resulting in arbitrary code execution as the postgres operating system user on the next server restart or configuration reload. WarehousePG 6.x is not affected, as the equivalent functions there enforce a superuser check internally.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
WarehousePGto a version that resolves this vulnerability.Fixed in 7.6.0-WHPG
Event History
Frequently Asked Questions
Which deployments are affected?
WarehousePG 7.x releases before 7.6.0-WHPG are affected. WarehousePG 6.x is not affected because its equivalent functions enforce authorization checks.
Does an attacker need elevated database privileges or an explicit GRANT?
No. Any authenticated database role, including a non-superuser, can execute the affected functions without an explicit GRANT.
What can a low-privileged database user do with this access?
They can create, append to, rename, or delete files under the data and log directories, and enumerate log file names. They can append directives to postgresql.auto.conf and obtain code execution as the postgres operating-system user after a server restart or configuration reload.
Is a default installation exposed?
Yes. The affected functions are executable by authenticated roles without a GRANT because the intended REVOKE was not carried over into WarehousePG core.
What version should be used to remediate the issue?
Upgrade affected WarehousePG 7.x deployments to 7.6.0-WHPG or later.