{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "1.18"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "61ef9ca82c8876dd80b33780893ba512af780e93"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "7bd1c189f9f9d54368cde096b07b194ad680f9fa"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v1.18",
                "range": [
                  {
                    "fixed": "2a501bab10dca3b99370300049bd39d1098e8cd0"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2a501bab10dca3b99370300049bd39d1098e8cd0"
            },
            {
              "fixed": "61ef9ca82c8876dd80b33780893ba512af780e93"
            },
            {
              "fixed": "7bd1c189f9f9d54368cde096b07b194ad680f9fa"
            }
          ],
          "repo": "https://github.com/libriscv/libriscv",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-gm4g-6c78-gr3w"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-125",
      "CWE-20"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62958.json"
  },
  "details": "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\u003cW\u003e::binary_loader` checks `PT_LOAD` program-header bounds, but `Memory\u003cW\u003e::serialize_execute_segment` trusts section-header `sh_offset` and `sh_size` when locating `.text` without verifying the file range against `m_binary.size()`; `Memory\u003cW\u003e::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.",
  "id": "CVE-2026-62958",
  "modified": "2026-11-04T02:30:54.971063336Z",
  "published": "2026-10-30T20:44:21.663Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/libriscv/libriscv/releases/tag/v1.18"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62958.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/libriscv/libriscv/security/advisories/GHSA-gm4g-6c78-gr3w"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62958"
    },
    {
      "type": "FIX",
      "url": "https://github.com/libriscv/libriscv/commit/61ef9ca82c8876dd80b33780893ba512af780e93"
    },
    {
      "type": "FIX",
      "url": "https://github.com/libriscv/libriscv/commit/7bd1c189f9f9d54368cde096b07b194ad680f9fa"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "libriscv: Out of bounds read vuln in the ELF parser (Denial of service)"
}