{"id":"CVE-2026-104947","kind":"vulnerability","aliases":["CVE-2026-104947"],"related":[],"title":"WarehousePG: low-privileged role can read other sessions' query text via logs","description":"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.","summary":"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.","severity":"medium","cvss":5.3,"epss":0.00216,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["data-warehouse","package","postgres","self-hosted","warehousepg"],"not_affected_if":["single-trusted-role","warehousepg-6.x"],"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\n- 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\n- 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`)","status":"open","published_at":"2026-10-21T14:17:08+00:00","first_seen_at":"2026-10-23T21:57:28+00:00","triaged_at":"2026-10-25T04:20:53+00:00","updated_at":"2026-10-25T04:20:53+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-25T04:20:53Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade WarehousePG to a release that contains the fix for this issue; the fixed version is unknown from the sources\n- 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`)","reach":"network","title":"WarehousePG: low-privileged role can read other sessions' query text via logs","impact":"medium","summary":"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.","category":"package","nicknames":[],"who_cares":["warehousepg","postgres","data-warehouse","self-hosted"],"confidence":0.6,"needs_auth":"yes","worst_case":"Low-privileged users read other users' query text from server logs","analyst_note":"Find the fixed WarehousePG release and the exact function signature from the NVD entry at https://nvd.nist.gov/vuln/detail/CVE-2026-104947.","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\n- Check whether non-superuser roles can execute the function, for example with `\\df+ gp_log_backend_memory_contexts` in psql","needs_analyst":true,"not_affected_if":["warehousepg-6.x","single-trusted-role"],"who_is_affected":"Deployments of WarehousePG 7.2.1 through 7.6.0 where any database role that can log in can reach the function. WarehousePG 6.x is not affected according to the description. Clusters where every login role is trusted and the function is already restricted have less exposure.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000714,"input_tokens":3507,"output_tokens":727,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-104947':16A,19A '-2026':15A,18A '-862':96C '6':196C '7.2.1':30B,85C '7.6.0':32B,87C 'affect':89C,200C 'also':120C 'amount':191C 'around':122C 'attack':168C 'authent':45B,109C 'author':41B,93C 'backend':36B,105C,134C,147C 'built':100C 'built-in':99C 'cach':72B,180C 'call':49B,52B,184C 'cannot':169C 'check':42B 'contain':69B 'context':38B,61B,107C,136C,159C 'cve':14A,17A 'cwe':95C 'data':21B 'data-warehous':20B 'databas':46B,110C 'detail':62B,160C,172C 'expos':33B 'flood':80B 'forc':144C 'function':102C,115C,137C 'generat':189C 'get':121C 'gp':34B,103C 'grant':118C 'host':27B 'includ':56B,154C,174C 'larg':190C 'log':13A,35B,66B,82B,104C,133C,165C,193C 'low':3A,140C 'low-privileg':2A,139C 'make':53B 'memori':37B,60B,106C,135C,158C 'miss':92C 'one':58B 'output':194C 'packag':23B 'pg':132C 'place':128C 'plan':181C 'postgr':24B 'postgresql':127C 'privileg':4A,141C 'queri':10A,73B,175C 'read':7A,170C 'repeat':78B,187C 'restrict':125C 'role':5A,47B,111C 'run':113C 'segment':64B,146C,163C 'self':26B 'self-host':25B 'server':65B,164C 'session':9A,55B,151C,153C 'superus':57B,124C,152C 'text':11A,74B,176C 'under':131C 'user':71B,142C,179C 'via':12A 'vulner':94C 'warehous':22B 'warehousepg':1A,28B,29B,83C,195C 'whpg':84C 'without':39B,116C 'write':59B,156C 'x':197C","nicknames":[],"mitigations":[],"who_affected":"Deployments of WarehousePG 7.2.1 through 7.6.0 where any database role that can log in can reach the function. WarehousePG 6.x is not affected according to the description. Clusters where every login role is trusted and the function is already restricted have less exposure.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T14:17:08+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"20be33e2-bf35-4d13-8fad-18bd2f3e3659","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-104947","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104947","severity":null,"published_at":"2026-10-21T14:17:08+00:00","modified_at":"2026-10-22T16:58:51+00:00","first_seen_at":"2026-10-23T21:57:28+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null},{"source":"epss","external_id":"CVE-2026-104947","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-104947","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T13:15:54+00:00","fetched_at":"2026-10-24T13:15:54+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}