Descrizione
@fastify/accepts-serializer cached serializer-selection results keyed by the request Accept header without a size limit or eviction policy. A remote unauthenticated client could send many distinct but matching Accept header variants to make the cache grow unbounded, eventually exhausting the Node.js heap and crashing the process. Versions <= 6.0.3 are affected. Update to 6.0.4 or later, which bounds the cache via an LRU with a default size of 100 entries, configurable through the new cacheSize plugin option.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5.
Versioni da aggiornare
- Fastify Fastify/Accepts-Serializer: vulnerabili le versioni precedenti alla
6.0.4→ aggiornare alla6.0.4o successiva.
Patch e advisory
- Advisory del vendor: cna.openjsf.org/security-advisories.html
- Advisory del vendor: github.com/fastify/fastify-accepts-serializer/s…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Applicare rate limiting e limiti sulle risorse a monte del servizio e monitorarne la disponibilità.
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 |
|---|---|---|---|
| Fastify | Fastify/Accepts-Serializer | < 6.0.4 | 6.0.4 |
Riferimenti
- Advisory del vendorhttps://cna.openjsf.org/security-advisories.html
- Advisory del vendorhttps://github.com/fastify/fastify-accepts-serializer/security/advisories/GHSA-qxhc-wx3p-2wmg