Skip to main content

hnswlib EUVDEUVD-2026-120081

| CVE-2026-124959 HIGH
Out-of-bounds Write (CWE-787)
2026-11-09 cret@cert.org GHSA-pvwj-4565-gq34
7.1
CVSS 3.1 · Vendor: cert
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft HNSW index with inflated element count
  2. Delivery
    Deliver malicious index file to victim
  3. Exploit
    Victim application calls loadIndex on file
  4. Execution
    Loader writes beyond allocated heap buffer
  5. Impact
    Out-of-bounds write crashes application

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target application (nmslib hnswlib 0.5.0-0.9.0 or Spotify Voyager 2.0.7-2.1.1) to call the loadIndex function on an attacker-supplied serialized HNSW index file whose declared element count is greater than the stored capacity used to allocate the heap buffer. Limiting factors: the vector is local (AV:L) and requires user interaction (UI:R) - the attacker cannot trigger it remotely but must get the victim to load the malicious index file, so risk is confined to workflows that ingest untrusted or externally sourced index files. No authentication is needed per PR:N, but the file-load action by the victim is mandatory.

Impact

Signals point to a moderate, conditional risk rather than an urgent priority. The official CVSS is 7.1 (HIGH), but the vector is AV:L/AC:L/PR:N/UI:R/S:U - local attack vector requiring the victim to load a crafted index file, not remote exploitation. EPSS is low at 0.17% (6th percentile) and there is no CISA KEV listing, so there is no evidence of active or widespread exploitation; the vuln.today decision label is 'this_week', consistent with a tractable but non-emergency fix. A public PoC reference exists (the m00dy.sh technical writeup) but it is not verified as working exploit code, so POC availability must not be conflated with active exploitation. Note a conflict between signals: the official CVSS assigns I:H/A:H, yet the description only states the loader can 'write beyond the allocated buffer and potentially crash the application' - i.e., the confirmed impact is a denial-of-service crash, with memory-corruption-to-code-execution only implied by the OOB-write class (CWE-787), not demonstrated in the available sources. Treat the integrity/impact rating as upper-bound until the vendor or PoC confirms controllable corruption.

Exploit ScenarioDerived

An attacker crafts a serialized HNSW index file whose stored element count exceeds the capacity used to size the heap buffer, then distributes it through a channel where applications load untrusted indexes (shared model/index repositories, downloaded artifacts). When a victim application built on hnswlib or Spotify Voyager calls loadIndex on the file, the loader writes past the allocated buffer and crashes the process. A public PoC reference (m00dy.sh writeup) exists but is not verified as working exploit code; exploitation is local (AV:L) with low complexity (AC:L) but requires the victim to load the file (UI:R).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 12, 2026

HNSW index deserialization in nmslib hnswlib (0.5.0 through 0.9.0) and Spotify Voyager (2.0.7 through 2.1.1) trusts the element count stored in a serialized index file without checking it against the capacity used to size the heap buffer, so a crafted index file drives an out-of-bounds heap write when loadIndex runs. The assessed vector is local (AV:L) with user interaction (UI:R) and no privileges required, meaning an attacker must first deliver a malicious index file and persuade a victim - or an automated ingestion pipeline - to load it; consequences are an integrity impact on the resulting in-memory index and a high availability impact from application crash or memory corruption. Severity is held back by the delivery precondition rather than by any missing prerequisite: EPSS is 0.17% (6th percentile), there is no KEV listing, and a public technical write-up on the index-capacity mismatch is referenced, but no working exploit code is confirmed from the available sources.

RemediationAI

The available intelligence does not identify a vendor-released fixed version for either hnswlib or Spotify Voyager, so patch status should be confirmed against the upstream repositories (https://github.com/nmslib/hnswlib and https://github.com/spotify/voyager) before relying on an upgrade; monitor https://nvd.nist.gov/vuln/detail/CVE-2026-124959 and https://vuldb.com/vuln/433162 for the vendor advisory and fixed release. Until a fix is published, the primary control is to stop feeding untrusted HNSW index files to loadIndex: restrict ingestion to index files produced internally or covered by a signature/checksum allowlist, and reject files from external sources - the trade-off is that legitimate cross-organisation index sharing (e.g. downloaded vector indexes in Python or JVM pipelines) must be routed through an out-of-band trust verification step. Where untrusted indexes must be parsed, perform the load in a sandboxed, resource-capped worker process with no access to credentials or adjacent data, so that a heap overflow results in a contained crash rather than compromise of the host process - at the cost of added latency and deployment complexity. Additional defence can be inserted at the wrapper level by validating serialized index headers (declared element count versus expected capacity) before invoking loadIndex, which stops the known malformed pattern but only defends against this specific field mismatch, not other parser defects.

Affected VersionsENISA

hnswlib 0.5.0 ≤0.9.0
Voyager 2.0.7 ≤2.1.1

Affected Packages

euvd hnswlib no fix
euvd voyager no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HNSW (Hierarchical Navigable Small World) is a graph-based approximate nearest neighbour index used for vector similarity search; nmslib's hnswlib is the header-only C++ implementation, and Spotify Voyager packages HNSW functionality for JVM and Python consumers. Both persist an index to disk and reload it through a loadIndex function that reads serialized metadata - including the element count and the stored capacity used to allocate the backing heap buffer - and then populates the structure. The flaw is CWE-787 (out-of-bounds write): the element count read from the file is never validated against the stored capacity, so a file declaring more elements than the buffer was sized for causes writes past the end of the allocation during load. The result is heap memory corruption that can crash the loading process and, depending on heap layout and what is adjacent to the buffer, may allow corruption of neighbouring data in the deserialized index. The available sources describe the capacity/count mismatch and the resulting overflow but do not specify a particular heap layout or allocator condition required for exploitation beyond supplying the crafted file.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (cert) PRIMARY 7.1 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
vuln.today AI 6.1 MEDIUM

Local crafted-file load with victim interaction gives AV:L/UI:R/PR:N; confirmed impact is a crash (A:H) plus an attacker-influenced out-of-bounds write (I:L), with no disclosure (C:N).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (cert).

CVSS VectorVendor: cert

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Nov 12, 2026 - 17:22 NVD
7.1 (HIGH)
CVE Published
Nov 09, 2026 - 15:17 cve.org
HIGH 7.1
CVE Published
Nov 09, 2026 - 15:17 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A heap memory corruption flaw exists in the widely used HNSW vector index libraries hnswlib and Spotify Voyager, meaning any team loading externally sourced serialized index files - including automated RAG or ML ingestion pipelines - risks application crashes and corrupted in-memory indexes. Because exploitation requires someone or some pipeline to open a crafted index file, the practical exposure is concentrated in data ingestion workflows rather than internet-facing services. Leadership should care because this class of bug can produce availability outages in AI/ML tooling and touches the supply chain for any product that imports third-party index artifacts.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Until a fix exists, prevent loading untrusted or externally sourced serialized index files, validate index headers and element counts before loadIndex, run index deserialization in a sandboxed or low-privilege process, and restrict ingestion pipelines to signed or provenance-verified artifacts.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
widely used ANN vector-search libraries, not general-purpose infrastructure
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy