CVE-2026-62958

libriscv: Out of bounds read vuln in the ELF parser (Denial of service)

Published Oct 30, 2026 CVSS 3.1 · 7.9 High EPSS < 1% KEV · Not listed
Description
libriscv is a RISC-V sandbox and emulator. Prior to 1.18, a crafted ELF binary can cause out-of-bounds reads in the host emulator. `Memory<W>::binary_loader` checks `PT_LOAD` program-header bounds, but `Memory<W>::serialize_execute_segment` trusts section-header `sh_offset` and `sh_size` when locating `.text` without verifying the file range against `m_binary.size()`; `Memory<W>::lookup()` has a similar section-table problem. Malformed `.text` or `.symtab` offsets can therefore bypass the program-header checks and point outside the binary buffer, crashing rvlinux. With suitable memory layout or integer overflow, out-of-buffer host heap memory may instead be mapped into the guest by `create_execute_segment()`, potentially exposing host memory. The reported reproducer demonstrates a host SIGSEGV, while memory disclosure through grooming is described as possible rather than demonstrated. This issue is fixed in version 1.18.

Analysis

AI-generated

Technical impact

The vulnerability lies in libriscv’s ELF parsing routines. By providing a crafted ELF file, an attacker can cause out‑of‑bounds reads when the emulator resolves section headers for .text or .symtab. These reads trigger a host segmentation fault, crashing the guest operating system (rvlinux). The report also notes that with suitable memory layout or integer overflow the host heap may be mapped into the guest, potentially exposing host memory, although this was described as a possibility rather than a demonstrated attack.

Affected Systems

libriscv:libriscv releases prior to version 1.18 are affected. The library functions Memory<W>::binary_loader, Memory<W>::serialize_execute_segment, Memory<W>::lookup, and create_execute_segment contain the unchecked bounds logic. Upgrading to v1.18 or later applies the fix that enforces valid bounds and removes the section‑table vulnerability.

Risk and Exploitability

The CVSS score of 7.9 indicates a high severity denial‑of‑service risk. EPSS is not available, and the vulnerability is not listed in CISA KEV, suggesting no public exploits have been observed yet. Attackers need to supply a malicious ELF binary to the emulator, which is the likely attack vector; therefore the vulnerability is local to hosts running the emulator with untrusted binaries. Nonetheless, the possibility of host memory exposure raises the potential impact to information disclosure if the condition is triggered.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libriscv to version 1.18 or later, which includes the out‑of‑bounds bounds check fix.
  • Until the patch is applied, avoid loading or executing untrusted ELF binaries in the emulator environment.
  • Restrict emulator usage to trusted users and monitor for unexpected SIGSEGV caused by malformed binaries.

Generated by OpenCVE AI on October 30, 2026 at 22:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Libriscv
Libriscv libriscv
Vendors & Products Libriscv
Libriscv libriscv
Type Values Removed Values Added
Description libriscv is a RISC-V sandbox and emulator. Prior to 1.18, a crafted ELF binary can cause out-of-bounds reads in the host emulator. `Memory<W>::binary_loader` checks `PT_LOAD` program-header bounds, but `Memory<W>::serialize_execute_segment` trusts section-header `sh_offset` and `sh_size` when locating `.text` without verifying the file range against `m_binary.size()`; `Memory<W>::lookup()` has a similar section-table problem. Malformed `.text` or `.symtab` offsets can therefore bypass the program-header checks and point outside the binary buffer, crashing rvlinux. With suitable memory layout or integer overflow, out-of-buffer host heap memory may instead be mapped into the guest by `create_execute_segment()`, potentially exposing host memory. The reported reproducer demonstrates a host SIGSEGV, while memory disclosure through grooming is described as possible rather than demonstrated. This issue is fixed in version 1.18.
Title libriscv: Out of bounds read vuln in the ELF parser (Denial of service)
Weaknesses CWE-125
CWE-20
References
Metrics cvssV3_1

{'score': 7.9, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 2, 2026, 2:55 PM
Reserved
Jul 14, 2026, 10:32 PM
Status
Deferred
Published
Oct 30, 2026, 9:17 PM
Modified
Nov 2, 2026, 7:35 PM