15/11/2026

AutoMapper stack overflow vulnerability: check affected versions and upgrade to a fixed release

CVE-2026-128082CVE-2026-32933

AutoMapper is affected by CVE-2026-128082: recursion through constructor parameters can bypass depth limits and terminate the application process. Check direct and transitive packages, then upgrade to 16.3.0 or 15.1.4 for the relevant branch.

AutoMapper stack overflow vulnerability: check affected versions and upgrade to a fixed release

At a glance

  • AutoMapper has a stack overflow vulnerability, CVE-2026-128082, when recursing through constructor parameters.
  • Deep attacker-controlled input can terminate the application process.
  • AutoMapper versions from 16.0.0 to before 16.3.0, and versions below 15.1.4, are affected.
  • Prioritize upgrading to 16.3.0 or 15.1.4 for the branch in use.
In this article

GitHub Advisories has published a vulnerability in AutoMapper, a .NET library for mapping data between objects. This article covers the affected versions, impact mechanism, and the checks and remediation steps in the advisory.

Overview and technical details

CVE-2026-128082 is an uncontrolled recursion flaw when mapping through constructor parameters. The advisory classifies it as CWE-674 and assigns a CVSS 3.1 score of 7.5.

FieldDetails
ProductAutoMapper, a .NET library for mapping data between objects
CVE / GHSACVE-2026-128082 / GHSA-6vhm-j9h7-f9gh
CWECWE-674 (Uncontrolled Recursion)
CVSS7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Related identifierCVE-2026-32933 (GHSA-rvv3-g6hj-g44x)
SourceGitHub Advisories

Affected systems

ProductAffected versionsFixed version
nuget:AutoMapper>= 16.0.0, < 16.3.016.3.0
nuget:AutoMapper< 15.1.415.1.4

Mechanism and impact

When mapping through constructor parameters, MaxDepth is not calculated before the destination object is created. As a result, both an explicitly configured limit and the default limit of 64 can be exceeded. Deep attacker-controlled input can cause an uncatchable StackOverflowException and terminate the application process.

The issue also affects ConstructUsing when mapping recursively through context.Mapper.

System checks

  1. Check the AutoMapper version declared directly in the .NET project:

    dotnet list package

    If the version is in an affected range, upgrade to 16.3.0 or 15.1.4 as appropriate.

  2. Check NuGet dependencies included transitively:

    dotnet list package --include-transitive

    If AutoMapper appears with an affected version, update the dependency to a fixed release.

Remediation and mitigation

  1. Prioritize upgrading: move AutoMapper to 16.3.0 or 15.1.4, according to the version branch in use.

  2. If an upgrade is not yet possible: limit input depth before mapping.

  3. For destination types with a parameterless constructor and settable properties, cfg.DisableConstructorMapping() can be used temporarily to map through properties, where MaxDepth is enforced.

  4. For positional records, the advisory identifies limiting input depth before mapping or upgrading; it provides no other workaround.

Source: GitHub Advisories — GHSA-6vhm-j9h7-f9gh.