Descrizione
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.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.1, EPSS 0.2% (percentile 6).
Versioni da aggiornare
- Spotify Voyager: vulnerabili le versioni dalla
2.0.7fino alla2.1.1inclusa → aggiornare a una release successiva alla2.1.1. - hnswlib hnswlib: vulnerabili le versioni dalla
0.5.0fino alla0.9.0inclusa → aggiornare a una release successiva alla0.9.0.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Spotify | Voyager | ≥ 2.0.7 ≤ 2.1.1 | — |
| hnswlib | hnswlib | ≥ 0.5.0 ≤ 0.9.0 | — |
Riferimenti
- Riferimentohttps://github.com/nmslib/hnswlib
- Riferimentohttps://github.com/spotify/voyager
- Riferimentohttps://m00dy.sh/notes/when-an-hnsw-index-lies-about-its-capacity