7.5high
AutoMapper: Denial of Service via uncontrolled recursion that bypasses MaxDepth
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gpwp-5797-mjff
Description
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 can recurse without an effective MaxDepth limit when mapping polymorphic graphs through Include or IncludeBase, runtime-typed object or interface members, nested Dictionary<string, object> or ExpandoObject sources, or recursive ConvertUsing type converters. Deep attacker-influenced graphs on these paths can throw an uncatchable StackOverflowException and terminate the process. This issue is fixed in versions 15.1.4 and 16.3.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| LuckyPennySoftware AutoMapper | >= 16.0.0, < 16.3.0, < 15.1.4 | CVE List |
| AutoMapper (NuGet) | from 16.0.0 before 16.3.0, before 15.1.4 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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 can recurse without an effective MaxDepth limit when mapping polymorphic graphs through Include or IncludeBase, runtime-typed object or interface members, nested Dictionary<string, object> or ExpandoObject sources, or recursive ConvertUsing type converters. Deep attacker-influenced graphs on these paths can throw an uncatchable StackOverflowException and terminate the process. This issue is fixed in versions 15.1.4 and 16.3.0.
GitHub Advisory Database
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-128081 changed 2026-11-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gpwp-5797-mjff changed 2026-11-13 | CC-BY-4.0 |
| NVD | CVE-2026-128081 changed 2026-11-18 | Public domain |