{"id":"CVE-2026-62958","kind":"vulnerability","aliases":["CVE-2026-62958"],"related":[],"title":"libriscv: crafted ELF file can read host memory and crash emulator","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.","summary":"libriscv is a RISC-V sandbox and emulator library. A crafted ELF binary with malformed section headers can make the host emulator read past its input buffer, crashing the process and possibly exposing host heap memory to the guest program.","severity":"high","cvss":7.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["emulator-embedders","libriscv","package","risc-v"],"not_affected_if":["libriscv-1.18-or-later","trusted-binaries-only"],"how_to_check":"- Check the libriscv version your project pins, for example in the dependency manifest or lockfile.\n- Look for any place your code loads untrusted ELF binaries into libriscv.","fix":"- libriscv: upgrade to `1.18` or later.","status":"open","published_at":"2026-10-30T21:17:14+00:00","first_seen_at":"2026-10-30T21:25:53+00:00","triaged_at":"2026-10-30T21:26:40+00:00","updated_at":"2026-10-30T21:26:40+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-30T21:26:40Z","model":"claude-haiku-5-5","output":{"fix":"- libriscv: upgrade to `1.18` or later.","reach":"unknown","title":"libriscv: crafted ELF file can read host memory and crash emulator","impact":"medium","summary":"libriscv is a RISC-V sandbox and emulator library. A crafted ELF binary with malformed section headers can make the host emulator read past its input buffer, crashing the process and possibly exposing host heap memory to the guest program.","audience":"developers","category":"package","nicknames":[],"who_cares":["libriscv","risc-v","emulator-embedders"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"host process crashes; host heap memory may be exposed to guest","analyst_note":"","how_to_check":"- Check the libriscv version your project pins, for example in the dependency manifest or lockfile.\n- Look for any place your code loads untrusted ELF binaries into libriscv.","plain_action":"","needs_analyst":false,"not_affected_if":["trusted-binaries-only","libriscv-1.18-or-later"],"who_is_affected":"Applications that embed libriscv and load ELF binaries supplied by untrusted users are exposed, since the malformed section headers are what trigger the flaw. Projects that only run trusted binaries they built themselves are less exposed. The sources do not say which downstream products bundle libriscv.","user_interaction":"unknown","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000691,"input_tokens":4354,"output_tokens":511,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-62958':14A,17A '1.18':78C,212C 'binari':39B,82C,95C,154C 'bound':88C,103C 'buffer':53B,155C,168C 'bypass':144C 'caus':84C 'check':97C,149C 'craft':2A,37B,80C 'crash':10A,54B,156C 'creat':180C 'cve':12A,15A 'demonstr':190C,205C 'describ':200C 'disclosur':196C 'elf':3A,38B,81C 'embedd':20B 'emul':11A,19B,34B,48B,75C,93C 'emulator-embedd':18B 'execut':107C,181C 'expos':59B,184C 'file':4A,124C 'fix':209C 'groom':198C 'guest':65B,178C 'header':43B,102C,112C,148C 'heap':61B,170C 'host':7A,47B,60B,92C,169C,185C,192C 'input':52B 'instead':173C 'integ':163C 'issu':207C 'layout':161C 'librari':35B 'libriscv':1A,21B,26B,67C 'load':99C 'loader':96C 'locat':119C 'lookup':129C 'm_binary.size':127C 'make':45B 'malform':41B,137C 'map':175C 'may':172C 'memori':8A,62B,94C,105C,128C,160C,171C,186C,195C 'offset':114C,141C 'out-of-bound':85C 'out-of-buff':165C 'outsid':152C 'overflow':164C 'packag':22B 'past':50B 'point':151C 'possibl':58B,202C 'potenti':183C 'prior':76C 'problem':136C 'process':56B 'program':66B,101C,147C 'program-head':100C,146C 'pt':98C 'rang':125C 'rather':203C 'read':6A,49B,89C 'report':188C 'reproduc':189C 'risc':24B,30B,71C 'risc-v':23B,29B,70C 'rvlinux':157C 'sandbox':32B,73C 'section':42B,111C,134C 'section-head':110C 'section-t':133C 'segment':108C,182C 'serial':106C 'sh':113C,116C 'sigsegv':193C 'similar':132C 'size':117C 'suitabl':159C 'symtab':140C 'tabl':135C 'text':120C,138C 'therefor':143C 'trust':109C 'v':25B,31B,72C 'verifi':122C 'version':211C 'without':121C","nicknames":[],"mitigations":[],"who_affected":"Applications that embed libriscv and load ELF binaries supplied by untrusted users are exposed, since the malformed section headers are what trigger the flaw. Projects that only run trusted binaries they built themselves are less exposed. The sources do not say which downstream products bundle libriscv.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T21:17:14+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-62958","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62958","severity":null,"published_at":"2026-10-30T21:17:14+00:00","modified_at":"2026-10-30T21:17:14+00:00","first_seen_at":"2026-10-30T21:25:53+00:00","fetched_at":"2026-10-30T21:25:53+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}