Skip to main content
Vulnerability Database/CVE-2026-104947

CVE-2026-104947: WarehousePG Authorization Bypass Vulnerability

CVE-2026-104947 is an authorization bypass flaw in WarehousePG versions 7.2.1 through 7.6.0 affecting the gp_log_backend_memory_contexts() function. This article covers the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104947 Overview

CVE-2026-104947 is a missing authorization vulnerability [CWE-862] affecting WarehousePG (WHPG) versions 7.2.1 through 7.6.0. The flaw resides in the built-in function gp_log_backend_memory_contexts(), which lacks a GRANT requirement and bypasses the superuser restriction PostgreSQL enforces on the underlying pg_log_backend_memory_contexts() function. Any authenticated low-privileged database role can invoke the function against other sessions, including those owned by superusers. The call forces segment backends to write memory context details, which may contain cached query text from other users, into segment server logs. WarehousePG 6.x is not affected.

Critical Impact

Any authenticated database role can trigger memory context dumps of arbitrary sessions, including superuser sessions, leaking cached query text to server logs and enabling log-flooding abuse.

Affected Products

  • WarehousePG (WHPG) 7.2.1
  • WarehousePG (WHPG) versions 7.2.2 through 7.5.x
  • WarehousePG (WHPG) 7.6.0

Discovery Timeline

  • 2026-10-21 - CVE CVE-2026-104947 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-104947

Vulnerability Analysis

WarehousePG exposes gp_log_backend_memory_contexts() as a built-in helper that wraps PostgreSQL's pg_log_backend_memory_contexts() across distributed segments. PostgreSQL restricts the native function to superusers because memory context output can disclose sensitive runtime data. The WarehousePG wrapper omits that authorization check and ships without a REVOKE on PUBLIC.

An attacker holding any valid database role can call the function and target the process ID of another backend. The coordinator fans the request out to segment backends, which then write detailed memory context information, including fragments of cached query plans, into segment server logs. The attacker cannot read those logs directly, but the data is persisted where any operator or log forwarding pipeline can retrieve it.

Root Cause

The root cause is a missing privilege check on a security-sensitive built-in function. WarehousePG re-implemented the distributed variant without preserving PostgreSQL's superuser gate and without issuing a default REVOKE ... FROM PUBLIC on the function. This design oversight collapses two separate controls, function GRANT and role-based superuser enforcement, into an implicitly open interface.

Attack Vector

Exploitation requires only network reachability to the database and valid credentials for any role. The attacker connects over the standard PostgreSQL protocol and executes a SELECT gp_log_backend_memory_contexts(<pid>) against target backend process IDs enumerated from pg_stat_activity. Repeated calls produce large volumes of log output, creating a secondary denial-of-service condition against log storage. See the EnterpriseDB Security Advisory CVE-2026-104947 for the vendor description.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-104947

Indicators of Compromise

  • Unexpected entries in segment server logs containing MemoryContext dumps attributed to backends owned by other roles.
  • Rapid growth in segment log volume correlated with a single client session.
  • Repeated executions of gp_log_backend_memory_contexts recorded in pg_stat_statements or audit logs.

Detection Strategies

  • Enable pgaudit or an equivalent statement audit extension and alert on any invocation of gp_log_backend_memory_contexts() by non-administrative roles.
  • Correlate pg_stat_activity snapshots with log-write spikes to attribute abnormal logging activity to specific sessions.
  • Review pg_proc.proacl on each cluster to confirm that EXECUTE on the function is restricted.

Monitoring Recommendations

  • Forward WarehousePG segment logs to a centralized SIEM and baseline normal log volume per segment.
  • Alert on sustained log-growth anomalies exceeding baseline by a defined threshold.
  • Monitor database authentication events for new or low-privileged roles issuing diagnostic function calls.

How to Mitigate CVE-2026-104947

Immediate Actions Required

  • Upgrade WarehousePG to a fixed release above 7.6.0 as published in the vendor advisory.
  • Revoke EXECUTE on gp_log_backend_memory_contexts() from PUBLIC and from any non-administrative roles.
  • Audit existing role grants and remove unnecessary database logins that could serve as a foothold.

Patch Information

EnterpriseDB has published remediation guidance in the EnterpriseDB Security Advisory CVE-2026-104947. Operators running WarehousePG 7.2.1 through 7.6.0 should apply the vendor-supplied fix. WarehousePG 6.x deployments do not require action for this issue.

Workarounds

  • Issue REVOKE EXECUTE ON FUNCTION gp_log_backend_memory_contexts(int) FROM PUBLIC; on every database until the patch is applied.
  • Restrict network access to the coordinator so only trusted application tiers can authenticate.
  • Rotate credentials for any role that does not require diagnostic function access and enforce least privilege through group roles.
bash
# Configuration example
psql -d postgres -c "REVOKE EXECUTE ON FUNCTION gp_log_backend_memory_contexts(int) FROM PUBLIC;"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.