{"id":"CVE-2026-111439","kind":"vulnerability","aliases":["CVE-2026-111439"],"related":[],"title":"openGauss: pg_read_binary_file_blocks lets low-privilege users read table data","description":"在 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 权限，直接读取表数据的二进制块。\n此漏洞影响此前3.0.0到6.0.0间的所有版本及补丁版，并在7.0.0-LTS版本修复。修复patch详见：https://gitcode.com/opengauss/openGauss-server/pull/9374。","summary":"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.","severity":"medium","cvss":4.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["database","opengauss","package","self-hosted"],"not_affected_if":["no-untrusted-db-logins","version-7.0.0-lts-or-later"],"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\n- 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)\n- Until upgraded, restrict who holds login roles on the database","status":"open","published_at":"2026-10-19T08:17:02+00:00","first_seen_at":"2026-10-23T21:57:17+00:00","triaged_at":"2026-10-25T04:39:43+00:00","updated_at":"2026-10-25T04:39:43+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T04:39:43Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade openGauss-server to the 7.0.0-LTS release, which contains the fix (see https://gitcode.com/opengauss/openGauss-server/pull/9374)\n- Until upgraded, restrict who holds login roles on the database","reach":"network","title":"openGauss: pg_read_binary_file_blocks lets low-privilege users read table data","impact":"medium","summary":"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.","category":"package","nicknames":[],"who_cares":["openGauss","database","self-hosted"],"confidence":0.7,"needs_auth":"yes","worst_case":"Authenticated users read raw table data without SELECT privilege","analyst_note":"","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\n- Confirm whether untrusted database users hold ordinary login roles on the instance","needs_analyst":false,"not_affected_if":["version-7.0.0-lts-or-later","no-untrusted-db-logins"],"who_is_affected":"Deployments of openGauss from 3.0.0 through 6.0.0 and their patch releases are affected, as any authenticated database user can call the function. Instances where all logins are fully trusted by the owning team are less exposed. Teams already on 7.0.0-LTS or later can skip it.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000669,"input_tokens":3678,"output_tokens":603,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-111439':17A,20A '-2026':16A,19A '/opengauss/opengauss-server/pull/9374':142C 'binari':4A,34B,81B,94C 'block':6A,36B,54B,96C 'blockcount':101C 'built':29B 'built-in':28B 'caller':43B 'check':47B 'compress':128C 'cve':15A,18A 'data':14A,83B,116C 'databas':21B,45B 'direct':84B 'file':5A,35B,53B,69B,95C,117C 'filepath':77B,125C 'function':31B,72B 'get':65B 'gitcode.com':141C 'gitcode.com/opengauss/opengauss-server/pull/9374':140C 'host':26B 'let':7A 'low':9A 'low-privileg':8A 'opengauss':1A,22B,39B,87C 'opengauss-serv':38B 'opengauss-server的':86C 'packag':23B 'path':70B 'pg':2A,32B,75B,92C,123C 'privileg':10A,46B 'raw':51B 'read':3A,12A,33B,50B,79B,93C 'readbinaryfileblocksfirstcal':104C 'relat':52B,76B,124C 'right':57B 'row':115C 'select':56B,109C,131C 'self':25B 'self-host':24B 'server':40B 'server的':88C 'skip':41B 'src/common/backend/utils/adt/genfile.cpp':89C 'startblocknum':99C 'tabl':13A,60B,67B,82B 'user':11A,62B 'without':55B '也仅用于识别文件形态':118C '任何拥有普通数据库连接权限的用户':121C '例如压缩数据的':127C '修复patch详见':139C '内置函数':91C '到6.0.0':135C '即可无需具备该表的':130C '只要能够通过':122C '和块数量':100C '因此':120C '在':85C '如':108C '存在权限校验逻辑缺陷':97C '并在7.0.0-lts':137C '文件路径':129C '未包含权限检查':119C '权限':110C,132C '模块中':90C '此外':112C '此漏洞影响此前3.0.0':134C '版本修复':138C '的校验':111C '的范围':102C '直接读取表数据的二进制块':133C '等函数获取到目标表的底层关系文件路径':126C '缺失了对调用者数据库权限':107C '该函数在入口处仅校验了起始块号':98C '该底层例程仅执行了路径规范化检查以及针对':105C '路径遍历和数据目录边界的基本检查':106C '辅助函数':113C '间的所有版本及补丁版':136C '随后直接调用底层文件读取例程':103C","nicknames":[],"mitigations":[],"who_affected":"Deployments of openGauss from 3.0.0 through 6.0.0 and their patch releases are affected, as any authenticated database user can call the function. Instances where all logins are fully trusted by the owning team are less exposed. Teams already on 7.0.0-LTS or later can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-19T08:17:02+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","cvss_by":"a1a479f7-907b-4ae8-a999-9148cadc9224","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-111439","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-111439","severity":null,"published_at":"2026-10-19T08:17:02+00:00","modified_at":"2026-10-19T20:56:36+00:00","first_seen_at":"2026-10-23T21:57:17+00:00","fetched_at":"2026-10-23T22:28:56+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"}