Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain valid database credentials
-
DeliveryAuthenticate to openGauss 7.0.0-RC1 or RC2
-
ExploitSubmit to_timestamp() query with NLS parameter against an unindexed table
-
InstallOptimizer selects seqscan+sort plan
-
C2SeqScan context freed, nls_fmt_str dangling
-
Executetimestamp_out() dereferences freed pointer
-
ImpactBackend process crashes, availability impacted
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation 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 with SQL execution privileges on the openGauss instance - the description explicitly states this precondition ('具备数据库 SQL 执行权限'). The query must use to_timestamp() with a third NLS parameter (nlsparam) argument. Critically, the seqscan+sort execution path must be selected by the query optimizer, which typically occurs when querying a table without a suitable index on the timestamp column and when sorting is required; this is an AC:H condition since it depends on optimizer plan selection rather than being unconditionally triggerable. The vulnerability is limited to openGauss-server 7.0.0-RC1 and RC2 only. Note: the vendor-supplied CVSS vector encodes PR:N (no privileges required), which conflicts with the description's explicit privilege requirement - defenders should treat SQL execution privilege as a real prerequisite until the vendor clarifies the discrepancy. |
| Impact | The vendor-assigned CVSS 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H) contains a notable inconsistency: the description explicitly states exploitation requires database SQL execution privileges ('攻击者在具备数据库 SQL 执行权限的情况下'), yet the vector encodes PR:N (no privileges). This inflates the score; with PR:L the adjusted score would be approximately 5.3. AC:H is credible - the seqscan+sort execution path is a specific internal code path that requires a particular query plan to be selected by the optimizer, adding non-trivial trigger complexity. Impact is confined to availability (A:H, C:N, I:N), meaning a successful exploit crashes only the affected backend session process rather than the entire database cluster, which somewhat limits blast radius. No EPSS data was provided; given the niche deployment footprint of openGauss outside China, widespread opportunistic exploitation is unlikely. Neither KEV listing nor public POC has been identified, meaning real-world exploitation risk is currently theoretical. The vulnerability is relevant primarily to organizations running openGauss 7.0.0-RC1 or RC2 innovation releases in environments where untrusted or semi-trusted users hold SQL execution rights. |
| Exploit ScenarioDerived | An attacker holding a valid database account on an openGauss 7.0.0-RC1 or RC2 instance submits a SELECT statement that calls to_timestamp() with an NLS format parameter in a way that causes the query planner to choose a seqscan followed by a sort operation - for example, scanning a large table without an appropriate index while converting a timestamp column. When the SeqScan node completes and its memory context is freed, the subsequent timestamp_out() call dereferences the now-freed nls_fmt_str pointer, crashing the backend process and terminating the attacker's connection along with any in-flight transaction on that backend. Repeated invocations can sustain service disruption. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 30, 2026
Heap-use-after-free in openGauss 7.0.0-RC1 and RC2 allows a database user with SQL execution privileges to crash the backend process by crafting a to_timestamp() call with NLS parameters that triggers the seqscan+sort execution path. The nls_fmt_str pointer is stored in session context but allocated within SeqScan's expression memory context, which is freed upon scan completion; subsequent access by timestamp_out() via CheckNlsFormat() dereferences the dangling pointer. The practical impact is denial of service through backend process termination. No public exploit code or active exploitation (CISA KEV) has been identified at time of analysis.
RemediationAI
Vendor-released patch: openGauss-server 7.0.0-RC3. Because RC1 and RC2 are innovation releases, no backport patches will be issued - upgrade to RC3 or a later version is the only supported remediation path per the vendor advisory. The upstream fix is documented in gitcode.com/opengauss/openGauss-server/pull/8877. As a compensating control where immediate upgrade is not feasible, restrict SQL execution privileges to trusted users only and audit role grants to remove unnecessary execute permissions; this limits the attacker surface since exploitation requires an authenticated session. Additionally, consider placing the database behind a connection proxy or PgBouncer-style pool that enforces session limits, which can bound the impact of repeated crash attempts. Note that these controls reduce exposure but do not eliminate the vulnerability.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
openGauss is a relational database management system derived from PostgreSQL, primarily developed and deployed by Huawei. The vulnerability resides in the NLS (National Language Support) extension of the to_timestamp() function, specifically to_timestamp_with_fmt_nls(). This function saves a pointer to nls_fmt_str into a session-level structure (u_sess->parser_cxt.nls_fmt_str) without copying it out of the ephemeral memory context owned by the SeqScan executor node. PostgreSQL-derived databases use per-node expression contexts (ExprContexts) that are reset or freed when the node finishes processing; in the seqscan+sort execution path, this reset occurs before the result output phase completes. CWE-416 (Use After Free) applies directly: the dangling session pointer is then dereferenced inside CheckNlsFormat() called from timestamp_out(), producing a heap-use-after-free. Under AddressSanitizer or Valgrind Memcheck the process exits immediately; in production builds the behaviour is undefined and manifests as backend crash or data corruption. Affected CPEs are cpe:2.3:a:opengauss-server:opengauss-server-7.0.0-rc1 and cpe:2.3:a:opengauss-server:opengauss-server-7.0.0-rc2.
Know when Opengauss Server 7 0 0 Rc2 gets its next vulnerability
- 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:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Description requires SQL execution privileges (PR:L not PR:N); AC:H retained because the specific seqscan+sort optimizer path must be triggered; no confidentiality or integrity impact.
Primary rating from Vendor (openGauss).
CVSS VectorVendor: openGauss
DescriptionCVE.org
openGauss 在处理带 NLS 参数的 to_timestamp 调用时,to_timestamp_with_fmt_nls() 会将 nls_fmt_str 保存到 u_sess->parser_cxt.nls_fmt_str。在 seqscan + sort 执行路径下,该字符串原本被分配在 SeqScan 的表达式上下文中;当 SeqScan 完成后,该内存上下文会被 reset,但后续结果输出阶段 timestamp_out() 仍会通过 CheckNlsFormat() 访问 u_sess->parser_cxt.nls_fmt_str,导致访问已释放内存。攻击者在具备数据库 SQL 执行权限的情况下,可构造特定 to_timestamp(..., ..., nlsparam) 查询触发 heap-use-after-free。在 ASan/Memcheck 环境下表现为数据库服务退出;在实际运行环境中可能造成后端进程异常退出,影响数据库服务可用性,形成拒绝服务风险。该问题在openGauss-server-7.0.0-RC1版本和openGauss-server-7.0.0-RC2版本存在,目前已在openGauss-server-7.0.0-RC3版本修复。由于 openGauss-server-7.0.0-RC1版本和openGauss-server-7.0.0-RC2均为创新版本,不会发布针对性补丁包,涉及版本升级至 openGauss-server-7.0.0-RC3或更新版本即可。
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
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-40326
GHSA-v555-5g3c-vq2x
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB