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-111439 Overview
CVE-2026-111439 is a missing authorization vulnerability [CWE-862] in the openGauss database server. The flaw resides in the pg_read_binary_file_blocks() built-in function within src/common/backend/utils/adt/genfile.cpp. The function validates only the startBlockNum and blockCount parameters before invoking ReadBinaryFileBlocksFirstCall(). Neither the entry point nor the helper is_row_data_file() verifies that the caller holds SELECT privileges on the underlying relation. Any authenticated database user who can resolve a table's physical file path via pg_relation_filepath() can read raw binary blocks of that table, bypassing object-level access control.
Critical Impact
Authenticated low-privileged users can read binary data blocks of tables they are not authorized to access, enabling disclosure of row data including _compress files for compressed relations.
Affected Products
- openGauss-server versions 3.0.0 through 6.0.0 (including patch releases)
- Compressed-data relations exposing _compress file paths
- Fixed in openGauss 7.0.0-LTS
Discovery Timeline
- 2026-10-19 - CVE-2026-111439 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-111439
Vulnerability Analysis
The vulnerability stems from inconsistent privilege enforcement in openGauss file-access built-ins. pg_read_binary_file_blocks() is designed to return raw binary blocks of a relation file at a given offset. On entry, the function checks that startBlockNum is non-negative and that blockCount falls within an allowed range. It then forwards the request to ReadBinaryFileBlocksFirstCall() without resolving the owning relation or checking the caller's grants.
ReadBinaryFileBlocksFirstCall() enforces only path hygiene. It normalizes the supplied path, rejects .. traversal sequences, and confirms the target resides inside the server data directory. The helper is_row_data_file() classifies the file as a row-data file but performs no authorization checks of its own.
Because relation file paths are deterministic and discoverable through pg_relation_filepath(), an attacker holding only CONNECT on the database can construct a valid path to any table — including the _compress segments produced by openGauss compressed storage — and read its blocks.
Root Cause
The root cause is a missing authorization check [CWE-862] in a privileged file-reading built-in. The function treats path validity as sufficient and omits a pg_class_aclcheck()-style verification mapping the file back to its relation and testing SELECT privilege.
Attack Vector
An attacker authenticates to openGauss with any valid role. They query pg_relation_filepath('target_table') to obtain the physical file path, then call pg_read_binary_file_blocks() with that path and the desired block range. The function returns raw page contents, which the attacker reconstructs offline into row data. No elevated privileges, no local access, and no user interaction are required.
The vulnerability mechanism is described in the OpenGauss Pull Request #9374 that remediates the issue.
Detection Methods for CVE-2026-111439
Indicators of Compromise
- Database audit records showing calls to pg_read_binary_file_blocks() from roles that do not own or hold SELECT on the resolved relation.
- Repeated calls to pg_relation_filepath() immediately followed by pg_read_binary_file_blocks() invocations from the same session.
- Access to _compress suffixed file paths by non-administrative accounts.
Detection Strategies
- Enable audit_system_function and audit_dml_state in openGauss to log calls to built-in file-access functions.
- Correlate session role, invoked function name, and file path arguments to flag reads of relation files outside the caller's grant set.
- Baseline legitimate operational use of pg_read_binary_file_blocks() — typically none from application roles — and alert on deviations.
Monitoring Recommendations
- Forward openGauss audit logs to a centralized logging platform and retain query text for forensic review.
- Alert on any non-superuser invocation of pg_read_binary_file_blocks(), pg_read_binary_file(), or pg_ls_dir().
- Track sudden spikes in binary file read volume per database role.
How to Mitigate CVE-2026-111439
Immediate Actions Required
- Upgrade openGauss-server to 7.0.0-LTS, which contains the authorization fix from pull request #9374.
- Revoke EXECUTE on pg_read_binary_file_blocks(), pg_read_binary_file(), and related file-access built-ins from PUBLIC and from all non-administrative roles.
- Audit historical query logs for prior invocations of the affected function by non-privileged roles.
Patch Information
The upstream fix is published in OpenGauss Pull Request #9374. The patch adds relation ownership and SELECT privilege checks before ReadBinaryFileBlocksFirstCall() is invoked. All openGauss deployments running 3.0.0 through 6.0.0 should upgrade to 7.0.0-LTS or apply the equivalent backport.
Workarounds
- Restrict database connections to trusted application roles only and remove interactive access for shared accounts.
- Revoke EXECUTE permissions on pg_read_binary_file_blocks() and pg_relation_filepath() from PUBLIC.
- Enforce network-level segmentation so that only approved application hosts can reach the database listener.
# Revoke access to the vulnerable built-ins until patched
REVOKE EXECUTE ON FUNCTION pg_read_binary_file_blocks(text, bigint, bigint) FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION pg_relation_filepath(regclass) 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

