---
id: "CVE-2026-124959"
page: "https://infrastack.ai/live/CVE-2026-124959"
kind: "vulnerability"
aliases: ["CVE-2026-124959"]
title: "hnswlib and Voyager: crafted index file overflows heap buffer on load"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["hnswlib", "node", "package", "python", "vector-search", "voyager"]
not_affected_if: ["trusted-index-files-only"]
published_at: "2026-11-09T15:17:19+00:00"
first_seen_at: "2026-11-09T15:27:06+00:00"
updated_at: "2026-11-09T15:28:13+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124959", "first_seen_at": "2026-11-09T15:27:06+00:00"}]
exploit_sources: []
---

# hnswlib and Voyager: crafted index file overflows heap buffer on load

Link for people: https://infrastack.ai/live/CVE-2026-124959 (this .md is for agents)

The loadIndex function in nmslib hnswlib and Spotify Voyager does not check the element count in a serialized HNSW index against the stored capacity. A crafted index file can make the loader write past its heap buffer, which may crash the application that loads it.

_Summary, check and fix written by a model from the sources; labelled as such._

## Timeline

- 2026-11-09T15:27:06+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-124959

## From the sources

The loadIndex function in nmslib hnswlib and Spotify Voyager does not verify that the element count in a serialized HNSW index is within the stored capacity used to allocate the heap buffer. An attacker can supply a crafted index file with an element count greater than the stored capacity, causing the loader to write beyond the allocated buffer and potentially crash the application when it loads the file.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
