Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain M-mode firmware execution
-
DeliveryIdentify menvcfg WPRI bit patterns
-
ExploitExecute crafted csrrs menvcfg operations
-
ExecutionCorrupt xstatus reserved bits
-
PersistBypass security checks or escalate privileges
-
ImpactPersist 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
Lifecycle Timeline
2DescriptionCVE.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
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.
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
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr
Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han
A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi
Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc
Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula
Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root
LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(
Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti
Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr
SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg
Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ
Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali
EUVD-2026-23954
GHSA-9m35-v5wh-m3xw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB