# CVE-2026-111441: HLL 反序列化 lenTotal/lenUsed 校验缺失导致堆越界写

> A missing length validation in openGauss's HLL deserialization allows authenticated users to trigger heap buffer overflows via crafted SQL inputs, potentially leading to code execution or crashes.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 19 Oct 2026
- **Updated:** 19 Oct 2026
- **Also known as:** GHSA-8rj5-vp35-h5mx

## What is CVE-2026-111441?

CVE-2026-111441 is a high-severity memory corruption vulnerability in openGauss-server, published on 19 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

在 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 。

Weakness: CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2026-111441?


## How do I fix CVE-2026-111441?

No fix has been published for CVE-2026-111441 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-111441 being exploited?

There is no known exploitation of CVE-2026-111441 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-111441 and fix it if it is affected.

What it is: CVE-2026-111441 is a high-severity memory corruption vulnerability in openGauss-server, published on 19 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-111441 in the wild and no public exploit code.

Affected product: openGauss-server. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-111441/ (Markdown: https://insights.sbomify.com/CVE-2026-111441/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-111441
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-111441
- OSV: https://osv.dev/vulnerability/CVE-2026-111441

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-111441/
Summaries are generated and may contain mistakes; the official description above is the record.
