Skip to content

[deps]: Update AutoMapper to v16 [SECURITY]#7715

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/nuget-automapper-vulnerability
Open

[deps]: Update AutoMapper to v16 [SECURITY]#7715
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/nuget-automapper-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 26, 2026

This PR contains the following updates:

Package Change Age Confidence
AutoMapper (source) [14.0.0][16.1.1] age confidence

AutoMapper Vulnerable to Denial of Service (DoS) via Uncontrolled Recursion

CVE-2026-32933 / GHSA-rvv3-g6hj-g44x

More information

Details

Summary

AutoMapper is vulnerable to a Denial of Service (DoS) attack. When mapping deeply nested object graphs, the library uses recursive method calls without enforcing a default maximum depth limit. This allows an attacker to provide a specially crafted object graph that exhausts the thread's stack memory, triggering a StackOverflowException and causing the entire application process to terminate.

Description

The vulnerability exists in the core mapping engine. When a source object contains a property of the same type (or a type that eventually points back to itself), AutoMapper recursively attempts to map each level.

Because there is no default limit on how many levels deep this recursion can go, a sufficiently nested object (approximately 25,000+ levels in standard .NET environments) will exceed the stack size. Since StackOverflowException cannot be caught in modern .NET runtimes, the application cannot recover and will crash immediately.

Impact
  • Availability: An attacker can crash the application server, leading to a complete Denial of Service.
  • Process Termination: Unlike standard exceptions, this terminates the entire process, not just the individual request thread.
Proof of Concept (PoC)

The following C# code demonstrates the crash by creating a nested "Circular" object graph and attempting to map it:

class Circular { public Circular Self { get; set; } }

// Setup configuration
var config = new MapperConfiguration(cfg => {
    cfg.CreateMap<Circular, Circular>();
});
var mapper = config.CreateMapper();

// Create a deeply nested object (28,000+ levels)
var root = new Circular();
var current = root;
for (int i = 0; i < 30000; i++) {
    current.Self = new Circular();
    current = current.Self;
}

// This call triggers the StackOverflowException and crashes the process
mapper.Map<Circular>(root);
Recommended Mitigation
  1. Secure Defaults: Implement a default MaxDepth (e.g., 32 or 64) for all mapping operations.
  2. Configurable Limit: Allow users to increase this limit if necessary, but ensure it is enabled by default to protect unsuspecting developers.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

LuckyPennySoftware/AutoMapper (AutoMapper)

v16.1.1

What's Changed

Security

Fixed an issue where certain cyclic or self-referential object graphs could trigger uncontrolled recursion during mapping, potentially resulting in stack exhaustion and denial of service.

Applications that process untrusted or attacker-controlled object graphs through affected mapping paths may be impacted.

Users should upgrade to this release.

Security advisory: GHSA-rvv3-g6hj-g44x

Thanks to @​skdishansachin for responsibly disclosing this issue.

Full Changelog: LuckyPennySoftware/AutoMapper@v16.1.0...v16.1.1

v16.1.0

What's Changed
New Contributors

Full Changelog: LuckyPennySoftware/AutoMapper@v16.0.0...v16.1.0

v16.0.0

What's Changed

Full Changelog: LuckyPennySoftware/AutoMapper@v15.1.0...v16.0.0

v15.1.3

What's Changed

Security

Fixed an issue where certain cyclic or self-referential object graphs could trigger uncontrolled recursion during mapping, potentially resulting in stack exhaustion and denial of service.

Applications that process untrusted or attacker-controlled object graphs through affected mapping paths may be impacted.

Users should upgrade to this release.

Security advisory: GHSA-rvv3-g6hj-g44x

Thanks to @​skdishansachin for responsibly disclosing this issue.

Full Changelog: LuckyPennySoftware/AutoMapper@v15.1.0...v15.1.3

v15.1.2

What's Changed
Security

Fixed an issue where certain cyclic or self-referential object graphs could trigger uncontrolled recursion during mapping, potentially resulting in stack exhaustion and denial of service.

Applications that process untrusted or attacker-controlled object graphs through affected mapping paths may be impacted.

Users should upgrade to this release.

Security advisory: GHSA-rvv3-g6hj-g44x

Thanks to @​skdishansachin for responsibly disclosing this issue.

Full Changelog: LuckyPennySoftware/AutoMapper@v16.1.1...v15.1.2

v15.1.1

What's Changed
Security

Fixed an issue where certain cyclic or self-referential object graphs could trigger uncontrolled recursion during mapping, potentially resulting in stack exhaustion and denial of service.

Applications that process untrusted or attacker-controlled object graphs through affected mapping paths may be impacted.

Users should upgrade to this release.

Security advisory: GHSA-rvv3-g6hj-g44x

Thanks to @​skdishansachin for responsibly disclosing this issue.

Full Changelog: LuckyPennySoftware/AutoMapper@v16.1.1...v15.1.1

v15.1.0

What's Changed

New Contributors

Full Changelog: LuckyPennySoftware/AutoMapper@v15.0.1...v15.1.0

v15.0.1

What's Changed

Full Changelog: LuckyPennySoftware/AutoMapper@v15.0.0...v15.0.1

This release supersedes the 15.0.0 release, reverting behavior and overloads so that the AddAutoMapper overloads separate the "scanning for maps" from the "scanning for dependencies". Unfortunately it's not really possible to combine these two together.

This also fixes a critical bug in #​4545 that does not work with .NET 4.x applications (as intended).

Because of this, the 15.0.0 will be delisted because of the breaking changes there.

v15.0.0

Full Changelog: LuckyPennySoftware/AutoMapper@v14.0.0...v15.0.0

  • Added support for .NET Standard 2.0
  • Requiring license key
  • Moving from MIT license to dual commercial/OSS license

To set your license key:

services.AddAutoMapper(cfg => {
    cfg.LicenseKey = "<License key here>";
});

This also introduced a breaking change with MapperConfiguration requiring an ILoggerFactory for logging purposes:

public MapperConfiguration(MapperConfigurationExpression configurationExpression, ILoggerFactory loggerFactory)

Registering AutoMapper with services.AddAutoMapper will automatically supply this parameter. Otherwise you'll need to supply the logger factory.

You can obtain your license key at AutoMapper.io


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the security label May 26, 2026
@renovate renovate Bot requested a review from a team May 26, 2026 14:16
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 26, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 2 times, most recently from b2fd59c to 8e6f7b1 Compare May 26, 2026 17:28
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 26, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 26, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 2 times, most recently from ea69cc9 to 27a65dc Compare May 26, 2026 17:37
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 26, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] - autoclosed May 26, 2026
@renovate renovate Bot closed this May 26, 2026
@renovate renovate Bot deleted the renovate/nuget-automapper-vulnerability branch May 26, 2026 19:02
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] - autoclosed [deps]: Update AutoMapper to v16 [SECURITY] May 26, 2026
@renovate renovate Bot reopened this May 26, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 3 times, most recently from 9bfe246 to c8afa53 Compare May 26, 2026 20:40
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 26, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from c8afa53 to 467b8d4 Compare May 26, 2026 21:18
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 26, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 27, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 2 times, most recently from 007d01b to 95725cd Compare May 27, 2026 10:55
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 27, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 95725cd to 986b993 Compare May 27, 2026 13:31
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 27, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 986b993 to a2f0ece Compare May 27, 2026 15:35
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 27, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from a2f0ece to 63cf7c7 Compare May 27, 2026 15:51
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from da184ee to d9c0e85 Compare May 27, 2026 22:18
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 27, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 27, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 2 times, most recently from 8159992 to bafabc3 Compare May 28, 2026 02:55
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from bafabc3 to 8147ba3 Compare May 28, 2026 14:54
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 8147ba3 to 557faac Compare May 28, 2026 15:02
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 557faac to e2b3283 Compare May 28, 2026 16:30
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from e2b3283 to 4a59d31 Compare May 28, 2026 16:36
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 4a59d31 to 1f56b90 Compare May 28, 2026 16:58
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 1f56b90 to fe12f85 Compare May 28, 2026 17:02
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 28, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from fe12f85 to a8ba935 Compare May 28, 2026 17:19
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] - autoclosed May 28, 2026
@renovate renovate Bot closed this May 28, 2026
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] - autoclosed [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
@renovate renovate Bot reopened this May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch 2 times, most recently from 6bf0f7e to 6256063 Compare May 28, 2026 17:54
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v16 [SECURITY] [deps]: Update AutoMapper to v15 [SECURITY] May 28, 2026
@renovate renovate Bot force-pushed the renovate/nuget-automapper-vulnerability branch from 6256063 to e96a835 Compare May 28, 2026 20:01
@renovate renovate Bot changed the title [deps]: Update AutoMapper to v15 [SECURITY] [deps]: Update AutoMapper to v16 [SECURITY] May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants