CVE-2026-128082: AutoMapper: Uncontrolled Recursion with Constructor Parameters
Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-6vhm-j9h7-f9gh
Summary
AutoMapper fails to enforce MaxDepth limits when mapping recursive data through constructor parameters, allowing unconstrained recursion that leads to an uncatchable StackOverflowException. Engineering teams using AutoMapper should upgrade to the patched versions immediately.
Who is affected
Deployments that map attacker-influenced, deeply nested data to destination types built via constructors (such as positional records) are vulnerable to process crashes. Because the default MaxDepth of 64 or explicit MaxDepth settings are bypassed during constructor parameter mapping, attackers can cause denial of service via a stack exhaustion crash.
Exploitability
The vulnerability has a CVSS base score of 7.5 (High) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, indicating it can be exploited remotely over the network with low complexity and no privileges or user interaction required, resulting in high availability impact. The EPSS score is 0.007 and CISA KEV lists active exploitation as no.
Remediation
- Upgrade NuGet AutoMapper to version 16.3.0 or 15.1.4.
- For destination types with parameterless constructors and settable properties, apply cfg.DisableConstructorMapping() as a workaround if upgrading is not immediately possible.
How to check your project
- Check project dependency files (such as .csproj or packages.lock.json) for NuGet package AutoMapper versions introduced 16.0.0 and fixed before 16.3.0, or introduced before 15.1.4.
- Review codebase for usages of AutoMapper mapping recursive structures to destination types that rely on constructor parameters or positional records.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| NuGet | AutoMapper |
>= 16.0.0, < 16.3.0 | 16.3.0 | dotnet add package AutoMapper --version 16.3.0 |
| NuGet | AutoMapper |
>= 0, < 15.1.4 | 15.1.4 | dotnet add package AutoMapper --version 15.1.4 |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | High |
FAQ
Does setting MaxDepth protect against this vulnerability?
No. Explicitly setting MaxDepth or relying on the default depth limit of 64 does not protect against this vulnerability when recursion goes through constructor parameters.
What happens when the vulnerability is exploited?
The mapping recurses without bound, throws an uncatchable StackOverflowException, and immediately terminates the process, causing a denial of service.
Are positional records affected?
Yes. Positional records use constructor parameters and have no workaround other than limiting input depth before mapping or upgrading to the fixed versions.
Original advisory description
References
- WEB https://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-6vhm-j9h7-f9gh
- WEB https://github.com/LuckyPennySoftware/AutoMapper/commit/4d51a4b8125b4d2302f2f1f455747c9648ad1acb
- WEB https://github.com/LuckyPennySoftware/AutoMapper/commit/639c2748cb9d3d07df8b86879ba7bcf211675c86
- PACKAGE https://github.com/LuckyPennySoftware/AutoMapper
- WEB https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v15.1.4
- WEB https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v16.3.0
Source records: GHSA-6vhm-j9h7-f9gh (OSV.dev) · EPSS by FIRST, 2026-11-21.