Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as ordinary DB user
-
DeliveryCraft packed HLL with lenTotal < lenUsed
-
ExploitSubmit via ::hll / hll_in() SQL entry
-
Executionmemcpy_s past heap allocation
-
ImpactHeap corruption and memory damage
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated database session as any ordinary (non-privileged) openGauss user - no administrative role is needed - and the ability to pass attacker-controlled bytes into the packed-HLL unpack path, which is reachable through standard SQL entry points hll_in(), hll_print(), and hll_cardinality() (e.g., a value cast with ::hll). The specific trigger is a malformed packed HLL whose encoded lenTotal is less than lenUsed, defeating the length check in HllObjectUnpack(). No special non-default server configuration is described as necessary; the HLL functionality has shipped since v2.1.0. The principal limiting factor is the authentication requirement (PR:L) - the attacker must already hold valid database credentials - so blast radius is bounded by who can connect and issue SQL; affected deployments are any version from 2.1.0 through 7.0.0-RC3, with 7.0.0-LTS fixed. |
| Impact | This is a credible, actionable priority for any organization running openGauss, though not an emergency on the level of an unauthenticated internet-facing RCE. The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H, base 8.1) is internally consistent with the description: the flaw is reachable over the network through ordinary SQL entry points (hll_in(), hll_print(), hll_cardinality(), e.g. via a ::hll cast), needs no user interaction, and requires only low privileges - a standard database connection user, not an administrator. The key mitigating signal is PR:L: an attacker must already be able to authenticate and issue SQL, which excludes purely external/unauthenticated actors and makes this most relevant as a privilege-escalation / denial-of-service vector for malicious or compromised low-privilege accounts and multi-tenant database environments. No EPSS score was supplied, so exploitation probability cannot be quantified. The CVE is NOT on CISA KEV and no proof-of-concept is referenced - the only reference is the vendor fix PR. No SSVC decision data was provided. Signals are therefore consistent rather than conflicting: a genuinely high-impact memory-corruption bug (heap out-of-bounds write → potential code execution or crash) gated behind authentication, with no evidence yet of real-world exploitation. Treat as a high-value patch for openGauss operators, prioritized by exposure of database credentials, but not a drop-everything KEV-class item absent exploitation evidence. |
| Exploit ScenarioDerived | An authenticated database user with an ordinary account connects to an affected openGauss server and submits a crafted packed HLL value - for example a bytestring cast with ::hll so it flows through hll_in() - in which the encoded lenTotal is smaller than lenUsed. Because HllObjectUnpack() allocates by lenTotal but sizes the memcpy_s() destination as lenUsed and never checks lenTotal >= lenUsed, the copy writes past the heap allocation, corrupting server memory and risking a crash or potential server-side code execution. No public proof-of-concept is identified at the time of analysis; exploitation requires only a valid low-privilege connection and no user interaction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Heap out-of-bounds write in openGauss Server's HLL (HyperLogLog) unpacking routine lets an authenticated database user corrupt server memory through ordinary SQL. HllObjectUnpack() in src/gausskernel/cbb/utils/hll/hll.cpp trusts an attacker-supplied packed HLL whose encoded lenTotal is smaller than lenUsed, allocates a buffer sized to lenTotal but then copies lenUsed bytes using memcpy_s() with the wrong destination size, so the safe-copy guard never fires. Any non-privileged user with a valid connection can reach the path via hll_in(), hll_print(), or hll_cardinality() - for example by casting bytes with ::hll - affecting versions from 2.1.0 through 7.0.0-RC3 (fixed in 7.0.0-LTS); the CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H reflects high integrity and availability impact, and no public exploit was identified at time of analysis.
RemediationAI
Vendor-released patch: openGauss 7.0.0-LTS - upgrade to that release, which adds the missing lenUsed <= lenTotal validation in HllObjectUnpack() and corrects the memcpy_s() destination size to the actually allocated lenTotal. Administrators tracking the source should apply the change from https://gitcode.com/opengauss/openGauss-server/pull/9380 to their own build if they cannot move to 7.0.0-LTS immediately. Because the flaw is in core built-in HLL functions reachable from any SQL session, there is no clean configuration toggle; the practical compensating controls are to restrict database connectivity to trusted networks and revoke or avoid granting CREATE/usage patterns that let untrusted parties run ad-hoc expressions with ::hll casts, and to audit hll_in(), hll_print(), and hll_cardinality() usage in logs for malformed packed HLL payloads - with the trade-off that these measures reduce exposure but do not eliminate the flaw for users who legitimately need HLL casting. Network-level allow-listing of client subnets and prompt review of accounts holding valid credentials (the PR:L prerequisite) limit blast radius until patching is complete.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
openGauss ships a HyperLogLog extension implemented in src/gausskernel/cbb/utils/hll/hll.cpp for approximate distinct-count estimation, and packed HLL values are serialized with a header (HLL_HEAD_SIZE) that carries two length fields: lenUsed and lenTotal. HllObjectUnpack() reads those fields from user-controlled bytes, validates only that the input is long enough to contain HLL_HEAD_SIZE + lenUsed, then allocates its destination buffer based on lenTotal while calling memcpy_s() with lenUsed bytes and - critically - passing lenUsed as the destination capacity rather than the actually allocated lenTotal. Because the routine never enforces lenUsed <= lenTotal, an attacker who sets lenTotal below lenUsed gets a heap allocation smaller than the subsequent copy, and the destination-size argument tells memcpy_s() the buffer is larger than it really is, so the runtime check cannot abort the copy. This is a classic CWE-122 heap-based buffer overflow caused by inconsistent length validation and a mismatched bounds parameter. The unpacking path is reachable from multiple SQL-callable surfaces - hll_in() (implicit cast input, e.g. '...'::hll), hll_print(), and hll_cardinality() - meaning the attack is a plain SQL statement rather than anything requiring file access or administrative privileges, though the CVSS PR:L component confirms a valid authenticated session is required. The defective code has been present since the packed-HLL unpack function was introduced in v2.1.0.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Reachable over the network via SQL by any ordinary authenticated user (AV:N/PR:L/AC:L/UI:N); heap out-of-bounds write corrupts memory (I:H/A:H) with no direct data disclosure (C:N).
Primary rating from Vendor (openGauss).
CVSS VectorVendor: openGauss
DescriptionCVE.org
在 openGauss-server 的 src/gausskernel/cbb/utils/hll/hll.cpp 中,内置函数 HllObjectUnpack() 存在长度校验缺陷。该函数从用户提供的 packed HLL 解析 lenUsed 与 lenTotal 后,仅检查输入长度足以覆盖 HLL_HEAD_SIZE + lenUsed,随后按 lenTotal 分配缓冲区、按 lenUsed 调用 memcpy_s() 拷贝输入,既未校验 lenTotal >= lenUsed,也将 memcpy_s() 目标大小写成 lenUsed 而非实际分配的 lenTotal,导致安全拷贝无法拦截越界写。hll_in()、hll_print()、hll_cardinality() 等 SQL 入口会走同一解包路径。因此,普通数据库连接用户只需构造 lenTotal 小于 lenUsed 的畸形 packed HLL(例如经 ::hll 进入 hll_in()),即可触发服务端堆越界写,存在内存破坏风险。此问题随 packed HLL 解包函数 HllObjectUnpack() 进入代码,v2.1.0 起即存在。受影响版本包括 2.1.0、3.0.x、3.1.x、5.0.x、5.1.0、6.0.x,以及 7.0.0-RC1、7.0.0-RC2、7.0.0-RC3。该问题已在 7.0.0-LTS 版本修复,通过在 HllObjectUnpack() 中补齐 lenUsed <= lenTotal 校验,并将 memcpy_s() 的目标大小改为实际分配的 lenTotal。修复 PR 见 https://gitcode.com/opengauss/openGauss-server/pull/9380 。
Executive ViewAI
openGauss Server versions 2.1.0 through 7.0.0-RC3 contain a high-severity memory-corruption flaw that any authenticated database user can trigger through ordinary SQL HLL operations, threatening database integrity and availability. Leadership should care because a low-privilege account could disrupt or tamper with production database services, and no public exploit was identified at time of analysis.
Interim mitigations: restrict HLL function execution to trusted roles; disable HLL features where not required; enforce least-privilege accounts; audit and alert on HLL queries; if the referenced 7.0.0-LTS fix is confirmed available, apply vendor patch (Vendor-released patch: 7.0.0-LTS).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
EUVD-2026-104052
GHSA-8rj5-vp35-h5mx
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB