Skip to main content

XiangShan CVE-2026-29642

| EUVDEUVD-2026-23954 HIGH
Internal Asset Exposed to Unsafe Debug Access Level or State (CWE-1244)
2026-04-20 mitre GHSA-9m35-v5wh-m3xw
7.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Gain M-mode firmware execution
  2. Delivery
    Identify menvcfg WPRI bit patterns
  3. Exploit
    Execute crafted csrrs menvcfg operations
  4. Execution
    Corrupt xstatus reserved bits
  5. Persist
    Bypass security checks or escalate privileges
  6. Impact
    Persist privileged access

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Asset protection level
Exploitation Conditions

Requires execution of privileged RISC-V M-mode (Machine Mode) instructions - the highest privilege level in RISC-V architecture, equivalent to firmware or hypervisor context, not accessible to operating system kernels or user applications. Attacker must either (1) directly execute code in M-mode via compromised bootloader, secure monitor, or hypervisor, or (2) induce M-mode firmware to perform the vulnerable csrrs operations on menvcfg register through exploitation of another vulnerability or firmware interface. Exploitation requires deep knowledge of RISC-V CSR architecture, specifically menvcfg register layout and WPRI field positions in the XiangShan implementation. Limited to systems using affected XiangShan processor core versions (commit aecf601e80, November 2024, through the fix at 5e3dd63). The PR:L privilege requirement in CVSS vector conflicts with actual M-mode requirement described - real exploitation barrier is significantly higher than low-privilege user access.

Impact

Real-world risk is significantly lower than the CVSS 7.8 base score suggests. The CVSS vector (AV:L/AC:L/PR:L/UI:N/S:U) indicates local access with low-privilege user, but the description clarifies that execution of privileged M-mode CSR operations is required - RISC-V M-mode is the highest privilege level, equivalent to hypervisor or firmware context, not a regular user account. This represents a fundamental discrepancy: PR:L (low privilege) conflicts with the requirement for machine-mode access. The EPSS score of 0.02% (5th percentile) aligns with the realistic attack surface - attackers must already have firmware-level code execution or ability to manipulate bootloader/hypervisor CSR operations. No CISA KEV listing, no public POC, and exploitation requires deep RISC-V architectural knowledge plus existing privileged access make this primarily a defense-in-depth issue for embedded systems and SoC vendors using XiangShan cores. The corruption of xstatus register bits could theoretically enable privilege escalation or security feature bypass in multi-tenant firmware environments, but practical impact depends on how downstream implementations utilize these status bits. Primary concern is for hardware vendors integrating XiangShan into production silicon rather than end-user systems. Patch availability via upstream commit (5e3dd63) mitigates risk for development teams, though integration into tagged releases and vendor SoC firmware updates may lag significantly.

Exploit ScenarioDerived

An attacker with compromised bootloader or hypervisor code (M-mode execution) on a system using vulnerable XiangShan core crafts a sequence of csrrs instructions targeting menvcfg register with specific bit patterns. These operations unexpectedly corrupt the processor's xstatus register by setting reserved WPRI bits, potentially disabling security features tracked in status bits or creating inconsistent privilege state. The attacker leverages this corrupted processor state to bypass security checks in subsequent firmware code, escalate privileges, or leak sensitive data from higher privilege contexts. Given the requirement for pre-existing M-mode access, this vulnerability is most relevant as a privilege persistence mechanism after initial compromise rather than an initial access vector.

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

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

Alert me

AnalysisAIv1 – Apr 21, 2026

Privileged CSR manipulation in XiangShan RISC-V processor core (commit aecf601e80, 2024-11-19) allows local attackers with M-mode access to corrupt processor status registers by exploiting improper handling of WPRI (Write Preserve, Read Ignore) fields in menvcfg operations. Carefully crafted csrrs instructions targeting menvcfg unexpectedly set reserved bits in xstatus to 1, violating RISC-V specification requirements that WPRI fields remain unchanged during CSR operations. Upstream fix committed (5e3dd63) but released version not confirmed. EPSS score 5th percentile indicates low real-world exploitation probability despite theoretical high impact, with no active exploitation or public POC identified.

RemediationAI

Update XiangShan processor core to commit 5e3dd63 or later from the upstream repository (https://github.com/OpenXiangShan/XiangShan/commit/5e3dd63), which addresses the menvcfg WPRI field handling flaw. Hardware vendors integrating XiangShan must resynththesize RTL, reverify the design, and redistribute updated FPGA bitstreams or tape out corrected silicon - note that silicon fixes require full chip respins with 6-12 month lead times and may not be economically feasible for low-volume products. For deployed systems running vulnerable XiangShan cores where hardware updates are impractical, implement firmware-level mitigations: minimize or eliminate dynamic menvcfg modifications in M-mode code (bootloaders, secure monitors, hypervisors), validate xstatus register contents after any menvcfg operations with explicit bit-masking to clear reserved fields, and restrict M-mode code execution to vendor-signed firmware only via secure boot mechanisms. These compensating controls reduce attack surface but cannot eliminate the hardware-level flaw. RISC-V specification references for validation: machine-mode CSR documentation at https://docs.riscv.org/reference/isa/priv/machine.html and WPRI field semantics at https://docs.riscv.org/reference/isa/priv/priv-csrs.html. Note that firmware workarounds add runtime overhead to CSR operations and may impact real-time performance in embedded applications.

Affected VersionsENISA

n/a n/a

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

XiangShan is an open-source out-of-order RISC-V processor core developed by the Institute of Computing Technology, Chinese Academy of Sciences. This vulnerability affects the Control and Status Register (CSR) subsystem, specifically the Machine Environment Configuration register (menvcfg) implementation. RISC-V privileged specification defines WPRI (Write Preserve, Read Ignore) fields as reserved bit ranges that must maintain their values across CSR operations - software modifying other fields should not alter WPRI bits, and reads should return predictable values. The menvcfg register, introduced in RISC-V privileged spec version 1.12 for configuring machine-mode environment features, contains multiple WPRI fields. The vulnerability maps to CWE-1244 (Internal Asset Exposed to Unsafe Debug Access Level), indicating improper isolation between debug/privileged operations and architectural state. The affected commit (aecf601e803bfd2371667a3fb60bfcd83c333027) from November 2024 suggests the flaw was introduced during recent menvcfg implementation or refactoring work in the XiangShan core's CSR handling logic.

Know when N A 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

NVD PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

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

Lifecycle Timeline

2
CVSS changed
Apr 21, 2026 - 20:22 NVD
7.8 (HIGH)
CVE Published
Apr 20, 2026 - 00:00 nvd
HIGH 7.8

DescriptionCVE.org

A local attacker who can execute privileged CSR operations (or can induce firmware to do so) performs carefully crafted reads/writes to menvcfg (e.g., csrrs in M-mode). On affected XiangShan versions (commit aecf601e803bfd2371667a3fb60bfcd83c333027, 2024-11-19), these menvcfg accesses can unexpectedly set WPRI (reserved) bits in the status view (xstatus) to 1. RISC-V defines WPRI fields as "writes preserve values, reads ignore values," i.e., they must not be modified by software manipulating other fields, and menvcfg itself contains multiple WPRI fields.

Executive ViewAI

Why It Matters

CVE-2026-29642 affects XiangShan RISC-V processor cores, allowing local M-mode attackers to corrupt critical processor status registers through malformed CSR instructions. Organizations deploying XiangShan processors in safety-critical or high-assurance environments face potential system instability and loss of processor integrity guarantees, though real-world exploitation probability remains low. Immediate verification of processor versions and M-mode access controls is required for affected deployments.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Enforce strict M-mode access controls limiting privileged processor mode access to verified firmware and trusted hypervisors; (2) Implement hardware-based CSR write monitoring if supported by deployment platform; (3) Isolate affected XiangShan systems from untrusted workloads pending patch availability; (4) Monitor XiangShan project repositories for release of design commit 5e3dd63 or later.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
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.0%
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in N A

View all
CVE-2024-51092 CRITICAL POC
9.1 May 08

LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr

CVE-2025-15684 MEDIUM POC
5.5 Aug 12

Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han

CVE-2024-45257 HIGH POC
7.3 May 08

A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi

CVE-2025-15687 LOW POC
2.1 Aug 12

Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc

CVE-2025-15686 LOW POC
2.1 Aug 12

Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula

CVE-2025-67888 HIGH POC
7.3 May 08

Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root

CVE-2024-53326 HIGH POC
7.3 May 08

LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(

CVE-2026-38360 CRITICAL POC
9.8 May 08

Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti

CVE-2026-30623 CRITICAL POC
9.8 Jul 15

Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr

CVE-2026-67917 CRITICAL POC
9.8 Aug 17

SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg

CVE-2026-75337 CRITICAL POC
9.8 Aug 27

Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ

CVE-2026-31072 CRITICAL POC
9.8 May 19

Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali

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