Skip to main content

openGauss Server CVE-2026-111441

| EUVDEUVD-2026-104052 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-10-19 openGauss GHSA-8rj5-vp35-h5mx
8.1
CVSS 3.1 · Vendor: openGauss
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as ordinary DB user
  2. Delivery
    Craft packed HLL with lenTotal < lenUsed
  3. Exploit
    Submit via ::hll / hll_in() SQL entry
  4. Execution
    memcpy_s past heap allocation
  5. Impact
    Heap 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

openGauss-server 7.0.0-RC1, 7.0.0-RC2 7.0.0-RC3
openGauss-server 5.0.0-5.0.5
openGauss-server 3.0.0-3.0.6
openGauss-server 3.1.0
openGauss-server 6.0.0-6.0.6
openGauss-server 2.1.0

Affected Packages

euvd opengauss_server no fix

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

Vendor (openGauss) PRIMARY 8.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
vuln.today AI 8.1 HIGH

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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (openGauss).

CVSS VectorVendor: openGauss

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Low
specific vendor open-source database, notable but largely regional footprint
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy