CVE-2026-124959
Nmaslib Hnswlib and Spotify Voyager HNSW Index Deserialization Heap Out-of-Bounds Write
Description
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.spotify » voyagerpreliminary | >= 0.5.0, <= 0.9.0>= 2.0.7, <= 2.1.1 | - |
Blast radius
100% of the dependent artifacts (2) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 27 |
| 2 hops | 27 |
Most used dependents
- com.spotify » scio-extra2 usages
- com.spotify » scio-repl1 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects PyPI (1 package) . See all on OSV
References
- Webhttps://m00dy.sh/notes/when-an-hnsw-index-lies-about-its-capacity
- Advisoryhttps://github.com/CVEProject/cvelistV5/tree/main/cves/2026/124xxx/CVE-2026-124959.json
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-124959
- Packagehttps://github.com/nmslib/hnswlib
- Packagehttps://github.com/spotify/voyager
