Descrizione
codebase-memory-mcp provides local code intelligence for developers and AI agents through a persistent graph and MCP tools. Prior to 0.9.0, automatic import of a repository's .codebase-memory/ artifact allocated a decompression buffer using the attacker-controlled 64-bit original_size value from artifact.json but truncated that value to int when passing the destination capacity to the Zstandard decompressor. A value with bit 31 set became negative and was sign-extended to a large size_t, allowing the decompressor to write frame content beyond the actual allocation. Indexing a malicious repository containing the crafted artifact could corrupt heap memory with attacker-controlled bytes, causing a reliable crash and potentially code execution. This issue is fixed in version 0.9.0.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8, EPSS 0.2% (percentile 15).
Versioni da aggiornare
- DeusData codebase-memory-mcp: vulnerabile la versione
< 0.9.0→ installare l'ultima release supportata dal vendor.
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 |
|---|---|---|---|
| DeusData | codebase-memory-mcp | < 0.9.0 | — |
Riferimenti
- Riferimentohttps://github.com/DeusData/codebase-memory-mcp/commit/a2f09c7ce97205147f127c2c8b12861bf74a02a3
- Riferimentohttps://github.com/DeusData/codebase-memory-mcp/pull/941
- Riferimentohttps://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0
- Riferimentohttps://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-8xwq-xv2x-853r