Descrizione
AutoMapper is a convention-based object-object mapper in .NET. Prior to 15.1.4 and from 16.0.0 until 16.3.0, AutoMapper increments type depth only after creating the destination, so recursive mapping performed through constructor parameters occurs before MaxDepth is counted. Destinations built through positional records or other constructors, and recursive ConstructUsing mappings that call context.Mapper, can therefore bypass explicit MaxDepth values and the default limit of 64. Deep attacker-influenced input can throw an uncatchable StackOverflowException and terminate the process. This issue is fixed in versions 15.1.4 and 16.3.0.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.7% (percentile 52).
Versioni da aggiornare
- LuckyPennySoftware AutoMapper: vulnerabile la versione
>= 16.0.0, < 16.3.0→ installare l'ultima release supportata dal vendor. - LuckyPennySoftware AutoMapper: vulnerabile la versione
< 15.1.4→ installare l'ultima release supportata dal vendor.
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 |
|---|---|---|---|
| LuckyPennySoftware | AutoMapper | >= 16.0.0, < 16.3.0 | — |
| LuckyPennySoftware | AutoMapper | < 15.1.4 | — |
Riferimenti
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/commit/4d51a4b8125b4d2302f2f1f455747c9648ad1acb
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/commit/639c2748cb9d3d07df8b86879ba7bcf211675c86
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v15.1.4
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v16.3.0
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-6vhm-j9h7-f9gh
- Riferimentohttps://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-6vhm-j9h7-f9gh