DEBIAN-CVE-2026-124959: Debian/hnswlib vulnerability
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 Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using hnswlib that load serialized HNSW index files are exposed if an attacker can cause them to load a crafted index file. The described impact is a potential application crash during index loading.
What must an attacker do to trigger the flaw?
The attacker needs to supply an HNSW index whose serialized element count exceeds the stored capacity used to allocate the loader's heap buffer. When the application loads that index, the loader can write beyond the allocated buffer.
Is a default configuration known to be affected?
The available information does not identify any particular configuration requirement or default setting. Exposure depends on whether the application loads an attacker-controlled or otherwise untrusted serialized index file.
What can be done if an update is not immediately available?
Do not load HNSW index files from untrusted sources. Restrict who can provide or replace serialized index files and validate their provenance before loading them.