---
id: "CVE-2026-128081"
page: "https://infrastack.ai/live/CVE-2026-128081"
kind: "vulnerability"
aliases: ["CVE-2026-128081", "GHSA-gpwp-5797-mjff"]
title: "AutoMapper: Denial of Service via uncontrolled recursion that bypasses MaxDepth"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "AutoMapper", "fixed": ["16.3.0"], "affected": ">= 16.0.0, < 16.3.0", "ecosystem": "nuget"}, {"name": "AutoMapper", "fixed": ["15.1.4"], "affected": "< 15.1.4", "ecosystem": "nuget"}]
ecosystems: ["nuget"]
tags: ["automapper", "cwe-674", "dotnet", "nuget", "package", "web-api"]
not_affected_if: ["shallow-data", "trusted-input-only"]
published_at: "2026-11-13T18:47:17+00:00"
first_seen_at: "2026-11-13T18:48:07+00:00"
updated_at: "2026-11-13T18:49:12+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-gpwp-5797-mjff", "first_seen_at": "2026-11-13T18:48:07+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128081", "first_seen_at": "2026-11-13T19:52:09+00:00"}]
exploit_sources: []
---

# AutoMapper: Denial of Service via uncontrolled recursion that bypasses MaxDepth

Link for people: https://infrastack.ai/live/CVE-2026-128081 (this .md is for agents)

AutoMapper's MaxDepth limits from CVE-2026-32933 do not cover several mapping paths, including derived type maps, object-typed members, dictionary and dynamic sources, and recursive converters. Mapping attacker-influenced deeply nested data through these paths causes a StackOverflowException that cannot be caught and terminates the process.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- nuget:AutoMapper affected >= 16.0.0, < 16.3.0 fixed 16.3.0
- nuget:AutoMapper affected < 15.1.4 fixed 15.1.4

## How to check

- Check the AutoMapper version in the project's package references or lock file (for example `dotnet list package`); affected versions are `>= 16.0.0, < 16.3.0` and `< 15.1.4`.
- Look for `Include` or `IncludeBase` maps, members typed as `object` or interfaces, `ConvertUsing` calls that invoke `context.Mapper.Map`, and mapping of `Dictionary<string, object>` or `ExpandoObject` from untrusted JSON.

## Fix

- AutoMapper `16.3.0` for the 16.x line
- AutoMapper `15.1.4` for the 15.x line

## Timeline

- 2026-11-13T18:48:07+00:00 ghsa https://github.com/advisories/GHSA-gpwp-5797-mjff
- 2026-11-13T19:52:09+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-128081

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/LuckyPennySoftware/AutoMapper/security-advisories/GHSA-gpwp-5797-mjff
- [advisory] Maintainer's advisory: github.com https://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-gpwp-5797-mjff
- [fix] Patch: github.com https://github.com/LuckyPennySoftware/AutoMapper/commit/aee81b50574c3c7005283cca2b2396e295bd8ed9
- [fix] Release: github.com https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v15.1.4
- [fix] Release: github.com https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v16.3.0
- [fix] Patch: github.com https://github.com/LuckyPennySoftware/AutoMapper/commit/bdbbf5967d20d28e611ab65de1d96d1047a95ab9

## From the sources

### 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's `MaxDepth`, 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 with `MaxDepth` set on the base map.
- **Runtime-typed members:** members typed as `object` or 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>` or `ExpandoObject` (for example, deserialized JSON) onto typed destinations recurses with no depth tracking. `MaxDepth` has no effect.
- **Recursive type converters:** `ConvertUsing` that calls `context.Mapper.Map` ignores `MaxDepth`.

### 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 `InsufficientExecutionStackException` instead 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: `MaxDepth` not enforced through constructor parameters and positional records, fixed in the same releases.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
