All vulnerabilities

NuGet

CVE-2026-128082

AutoMapper: Uncontrolled Recursion with Constructor Parameters

Severity
High 7.5
Published
13 Nov 2026
Last changed
13 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
15.1.4, 16.3.0
Exploit chance
0.7% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled recursion (CWE-674)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-6vhm-j9h7-f9gh
Sources
OSV.dev and GitHub

Description

MaxDepth, whether set explicitly or applied by default (64) to self-referential type maps, was not enforced when the recursion goes through constructor parameters. Mapping a deeply nested source to a destination built through its constructor, such as a positional record, recurses without bound and throws a StackOverflowException. That exception can't be caught and terminates the process. This bypasses the mitigation for CVE-2026-32933.

The type depth used by MaxDepth was incremented only after the destination object was created. Constructor parameters, including child objects of the same type, are mapped while the destination is created, so each level recursed before its parent was counted, and the depth check never tripped.

Affected:

  • destination types mapped through constructor parameters, including positional records
  • both an explicit MaxDepth(n) and the default limit of 64
  • ConstructUsing that maps recursively through context.Mapper
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

If the destination type has a parameterless constructor and settable properties, cfg.DisableConstructorMapping() makes AutoMapper map through the properties, where MaxDepth is enforced. Positional records have no workaround other than limiting input depth before mapping, or upgrading.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
AutoMapperNuGet · osv:NuGet:AutoMapper
  • Every version before 15.1.4
  • From 16.0.0 before 16.3.0

About AutoMapper

Total downloads (NuGet)
1,202,351,461NuGet, 24 Nov 2026

Vulnerabilities in AutoMapper

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
2
Known exploited
0
Search the list for AutoMapper

References