Descrizione
In Valkey JSON 1.0.0 through 1.0.2, a recursive JSONPath expression such as $..* returns both an array and elements nested inside it. The size-changing mutators (JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM and JSON.CLEAR) process the ancestor first, which can reallocate its element buffer and free the old storage while the descendant entries in the result set still point into it; the module then writes through those dangling pointers. An authenticated user who can run these commands can use this to reliably crash the server, and it has been developed into remote code execution as the user the server runs as. Servers that do not load the JSON module, including through valkey-bundle, are not affected.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.8, EPSS 1.2% (percentile 67).
Versioni da aggiornare
- Valkey Valkey JSON: vulnerabili le versioni dalla
1.0.0precedenti alla1.0.3→ aggiornare alla1.0.3o successiva.
Indicazioni del vendor
Soluzione (testo originale del vendor):
Upgrade to Valkey JSON 1.0.3 or later, or to a valkey-bundle release that ships it.
Workaround (testo originale del vendor):
Use Valkey ACLs to restrict JSON.ARRAPPEND, JSON.ARRINSERT, JSON.ARRPOP, JSON.ARRTRIM and JSON.CLEAR if your application does not use them. Applications that pass user-controlled JSONPath expressions to these commands are the most exposed; limiting paths to non-recursive expressions also avoids the defect.
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 |
|---|---|---|---|
| Valkey | Valkey JSON | ≥ 1.0.0 < 1.0.3 | 1.0.3 |