Vulnerability DatabaseCVE-2026-128082

CVE-2026-128082: 
C# vulnerability analysis and mitigation

Overview

CVE-2026-128082 is an Uncontrolled Recursion vulnerability in AutoMapper, a convention-based object-object mapper for .NET, that allows unauthenticated remote attackers to crash the host process via a denial-of-service attack. The flaw affects all AutoMapper versions prior to 15.1.4 and versions 16.0.0 through 16.3.0 (exclusive). It was reported by @mcambria and publicly disclosed on November 13, 2026, with patches released the same day. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

Technical details

The root cause is a logic flaw (CWE-674: Uncontrolled Recursion) in TypeMapPlanBuilder.CreateAssignmentFunc within AutoMapper's execution engine. The type depth counter (IncTypeDepth) was incremented after the destination object was created, but constructor parameters — including recursive child objects of the same type — are resolved during destination creation. This means each recursive level was processed before its parent's depth was counted, so the OverTypeDepth check never triggered. The bug affects destination types mapped through constructor parameters (e.g., positional C# records), explicit MaxDepth(n) configurations, the default self-referential limit of 64, and ConstructUsing lambdas that call context.Mapper recursively. The fix moves the depth increment to before createDestination is invoked, aligning constructor mapping behavior with property mapping (GitHub Advisory, Patch Commit).

Impact

Successful exploitation causes an uncatchable StackOverflowException that immediately terminates the .NET host process, resulting in complete loss of availability for any service relying on the affected AutoMapper instance. There is no confidentiality or integrity impact — the vulnerability is a pure denial-of-service. Any application that accepts externally influenced, deeply nested data and maps it to a constructor-based destination type (including positional records) is at risk; on a standard Windows 1 MB stack, crashes occur between 1,000 and 2,000 nesting levels (GitHub Advisory).

Exploitability

A proof-of-concept exploit is publicly available in the GitHub Security Advisory, consisting of a complete, runnable C# program that triggers the crash using a 30,000-level linked list mapped through a positional constructor (GitHub Advisory). The NVD SSVC assessment classifies the vulnerability as automatable with PoC-level exploitation. No in-the-wild exploitation has been observed, no threat actor attribution exists, and the EPSS score is 0.0. The vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a .NET application that uses a vulnerable AutoMapper version (< 15.1.4 or 16.0.0–16.3.0) and accepts externally supplied, deeply nested data that is mapped to a destination type built through a constructor (e.g., a positional record or a class with only a parameterized constructor).
  2. Craft deeply nested input: Construct an input payload representing a deeply nested object graph — for example, a JSON or deserialized object chain with 1,000+ levels of nesting in a recursive field (e.g., { "next": { "next": { ... } } }).
  3. Submit the payload: Send the crafted input to the application endpoint that triggers the AutoMapper mapping call (e.g., an API endpoint that deserializes the body and calls mapper.Map<DestinationType>(input)).
  4. Trigger unbounded recursion: AutoMapper begins mapping the nested source object. Because the depth counter is incremented after destination creation, each recursive constructor call occurs before the parent's depth is counted, so MaxDepth never trips regardless of its configured value.
  5. Process crash: The .NET thread stack is exhausted, throwing an uncatchable StackOverflowException that terminates the entire host process, taking down the service (GitHub Advisory).

Indicators of compromise

  • Logs: Application event logs or Windows Event Log showing an abrupt process termination with exit code -1073741571 (0xC00000FD, STATUS_STACK_OVERFLOW) for the .NET host process; absence of a graceful shutdown log entry immediately before the crash.
  • Logs: ASP.NET or application framework logs showing an unhandled StackOverflowException or a sudden gap in request processing logs followed by a process restart.
  • Network: Repeated HTTP requests to the same API endpoint carrying unusually large or deeply nested JSON/XML payloads, particularly with recursive or self-referential structures in a single field.
  • Process: Unexpected restart of the .NET application host (e.g., IIS worker process w3wp.exe, Kestrel process, or containerized app) without a corresponding deployment or configuration change event.
  • File System: Crash dump files (.dmp) generated in the application directory or configured dump path, timestamped at the time of the incident, containing stack frames from AutoMapper's TypeMapPlanBuilder or CreateAssignmentFunc (GitHub Advisory).

Mitigation and workarounds

Upgrade AutoMapper to version 15.1.4 (for the 15.x branch) or 16.3.0 (for the 16.x branch); both releases fix the depth-counting logic so constructor mapping respects MaxDepth identically to property mapping (v15.1.4 Release, v16.3.0 Release). As an interim workaround for destination types that have a parameterless constructor and settable properties, add cfg.DisableConstructorMapping() to the mapper configuration to force property-based mapping where MaxDepth is enforced. For positional records (which have no parameterless constructor), the only non-upgrade workaround is to validate and reject excessively nested input before it reaches the AutoMapper call. Note that simply setting an explicit MaxDepth value is not sufficient protection on vulnerable versions (GitHub Advisory).

Community reactions

The vulnerability was discovered by community contributor @mcambria while writing a test to verify their own MaxDepth mitigation for the related CVE-2026-32933, and was responsibly reported to the AutoMapper maintainer @jbogard. The advisory notes that the same releases also fix a companion advisory (GHSA-gpwp-5797-mjff) covering additional MaxDepth bypass paths. The patched releases additionally improve the failure mode: recursion that cannot be limited by MaxDepth now throws a catchable InsufficientExecutionStackException instead of the uncatchable StackOverflowException, a notable defensive improvement for application resilience (v15.1.4 Release, v16.3.0 Release).

Additional resources


Source: This report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-128082HIGH7.5
  • C# logoC#
  • AutoMapper
NoYesNov 13, 2026
CVE-2026-128081HIGH7.5
  • C# logoC#
  • AutoMapper
NoYesNov 13, 2026
CVE-2026-120792HIGH7.3
  • JavaScript logoJavaScript
  • Aspire.Cli.linux-arm64
NoYesNov 10, 2026
CVE-2026-120778HIGH7.3
  • JavaScript logoJavaScript
  • Aspire.Cli.linux-x64
NoYesNov 10, 2026
CVE-2026-120796MEDIUM5.3
  • C# logoC#
  • dotnet11.0
NoYesNov 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management