---
id: "CVE-2026-111439"
kind: "vulnerability"
aliases: ["CVE-2026-111439"]
title: "openGauss: pg_read_binary_file_blocks lets low-privilege users read table data"
severity: "medium"
cvss: 4.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["database", "opengauss", "package", "self-hosted"]
not_affected_if: ["no-untrusted-db-logins", "version-7.0.0-lts-or-later"]
published_at: "2026-10-19T08:17:02+00:00"
first_seen_at: "2026-10-23T21:57:17+00:00"
updated_at: "2026-10-25T04:39:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-111439", "first_seen_at": "2026-10-23T21:57:17+00:00"}]
---

# openGauss: pg_read_binary_file_blocks lets low-privilege users read table data

The built-in function pg_read_binary_file_blocks() in openGauss-server skips the caller's database privilege check, so it reads raw relation file blocks without SELECT rights on the table. A user who can get a table's file path through functions such as pg_relation_filepath() can read the binary table data directly.

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

## How to check

- Check the openGauss version with `gsql -c "SELECT version();"`; versions from 3.0.0 to 6.0.0, including patch releases, are listed as affected
- Confirm whether untrusted database users hold ordinary login roles on the instance

## Fix

- Upgrade openGauss-server to the 7.0.0-LTS release, which contains the fix (see https://gitcode.com/opengauss/openGauss-server/pull/9374)
- Until upgraded, restrict who holds login roles on the database

## Timeline

- 2026-10-23T21:57:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-111439

## From the sources

在 openGauss-server的 src/common/backend/utils/adt/genfile.cpp 模块中，内置函数 pg_read_binary_file_blocks() 存在权限校验逻辑缺陷。该函数在入口处仅校验了起始块号（startBlockNum）和块数量（blockCount）的范围，随后直接调用底层文件读取例程 ReadBinaryFileBlocksFirstCall()。该底层例程仅执行了路径规范化检查以及针对 .. 路径遍历和数据目录边界的基本检查，缺失了对调用者数据库权限（如 SELECT 权限）的校验。此外，辅助函数 is_row_data_file() 也仅用于识别文件形态，未包含权限检查。因此，任何拥有普通数据库连接权限的用户，只要能够通过 pg_relation_filepath() 等函数获取到目标表的底层关系文件路径（例如压缩数据的 _compress 文件路径），即可无需具备该表的 SELECT 权限，直接读取表数据的二进制块。
此漏洞影响此前3.0.0到6.0.0间的所有版本及补丁版，并在7.0.0-LTS版本修复。修复patch详见：https://gitcode.com/opengauss/openGauss-server/pull/9374。

---

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