AutoMapper: Denial of Service via uncontrolled recursion that bypasses MaxDepth
Summary
The default and explicit MaxDepth limits added for CVE-2026-32933 don't apply to several mapping paths. Mapping a deeply nested source through any of them recurses without bound and throws a StackOverflowException, which can't be caught and terminates the process.
Affected paths
- Polymorphic maps: derived type maps (
Include/IncludeBase) didn't inherit the base map'sMaxDepth, and the default limit for self-referential maps was only applied to the base map. A chain of derived objects was mapped without a limit, even withMaxDepthset on the base map. - Runtime-typed members: members typed as
objector an interface aren't seen by self-reference detection, so the default limit isn't applied. - Dictionary and dynamic sources: mapping a nested
Dictionary<string, object>orExpandoObject(for example, deserialized JSON) onto typed destinations recurses with no depth tracking.MaxDepthhas no effect. - Recursive type converters:
ConvertUsingthat callscontext.Mapper.MapignoresMaxDepth.
Impact
An application that maps attacker-influenced, deeply nested data through one of these paths can be crashed. On a 1 MB stack (the Windows default), a few thousand levels of nesting are enough.
Fix
- Derived type maps inherit
MaxDepth, and the default limit is applied to them. - Every runtime map call checks for sufficient stack, and fails with a catchable
InsufficientExecutionStackExceptioninstead of overflowing.
Workarounds
Set MaxDepth explicitly on derived maps and on maps reached through object or interface members. There is no configuration workaround for dictionary or dynamic sources, or for recursive type converters, other than limiting input depth before mapping.
Related
- CVE-2026-32933 (GHSA-rvv3-g6hj-g44x)
- GHSA-6vhm-j9h7-f9gh:
MaxDepthnot enforced through constructor parameters and positional records, fixed in the same releases.
What to do
Upgrade AutoMapper to version 15.1.4, 16.3.0, or later. If updating is not immediately possible, apply workarounds by setting depth limits explicitly on derived maps and object/interface members, or limit input depth prior to mapping.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| .NET (NuGet) | AutoMapper | >= 16.0.0, < 16.3.0, < 15.1.4 | 16.3.0, 15.1.4 |
References
- https://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-gpwp-5797-mjff
- https://github.com/LuckyPennySoftware/AutoMapper/commit/aee81b50574c3c7005283cca2b2396e295bd8ed9
- https://github.com/LuckyPennySoftware/AutoMapper
- https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v15.1.4
- https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v16.3.0
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-674- Platform
- .NET (NuGet)
- Package
AutoMapper- Disclosed
- 13.11.2026
- Updated
- 14.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-gpwp-5797-mjff - CC BY 4.0
Vulnerability history: AutoMapper
All published vulnerabilities of this package (.NET (NuGet)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 3
- First → latest
- 03.2026 11.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 3
Disclosures per year
- 2026: 3
-
AutoMapper: Denial of Service via uncontrolled recursion that bypasses MaxDepth this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.