---
id: "CVE-2026-104947"
kind: "vulnerability"
aliases: ["CVE-2026-104947"]
title: "WarehousePG: low-privileged role can read other sessions' query text via logs"
severity: "medium"
cvss: 5.3
epss: 0.00216
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["data-warehouse", "package", "postgres", "self-hosted", "warehousepg"]
not_affected_if: ["single-trusted-role", "warehousepg-6.x"]
published_at: "2026-10-21T14:17:08+00:00"
first_seen_at: "2026-10-23T21:57:28+00:00"
updated_at: "2026-10-25T04:20:53+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-104947", "first_seen_at": "2026-10-23T21:57:28+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-104947", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# WarehousePG: low-privileged role can read other sessions' query text via logs

WarehousePG 7.2.1 through 7.6.0 exposes gp_log_backend_memory_contexts() without an authorization check, so any authenticated database role can call it. The call makes other sessions, including superuser ones, write memory context details to segment server logs, which can contain other users' cached query text and can be repeated to flood the logs.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Confirm the installed WarehousePG version with `gpstate --version` or `postgres --version` and check whether it falls in 7.2.1 through 7.6.0
- Check whether non-superuser roles can execute the function, for example with `\df+ gp_log_backend_memory_contexts` in psql

## Fix

- Upgrade WarehousePG to a release that contains the fix for this issue; the fixed version is unknown from the sources
- Until patched, revoke execute on the function from non-admin roles, for example `REVOKE EXECUTE ON FUNCTION gp_log_backend_memory_contexts(integer) FROM PUBLIC;` (signature unknown from sources; verify with `\df`)

## Timeline

- 2026-10-23T21:57:28+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-104947
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-104947

## From the sources

WarehousePG (WHPG) 7.2.1 through 7.6.0 is affected by a missing authorization vulnerability (CWE-862) in the built-in function gp_log_backend_memory_contexts(). Any authenticated database role can run this function without a GRANT. It also gets around the superuser restriction that PostgreSQL places on the underlying pg_log_backend_memory_contexts() function. A low-privileged user can force the segment backends of any other session, superuser sessions included, to write their memory context details to the segment server logs, which the attacker cannot read. Those details can include query text from other users' cached plans, and the call can be repeated to generate large amounts of log output. WarehousePG 6.x is not affected.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
