Skip to content

Bump AutoMapper from 13.0.1 to 16.1.1#865

Closed
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/nuget/src/Benchmark/AutoMapper-16.1.1
Closed

Bump AutoMapper from 13.0.1 to 16.1.1#865
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/nuget/src/Benchmark/AutoMapper-16.1.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 14, 2026

Updated AutoMapper from 13.0.1 to 16.1.1.

Release notes

Sourced from AutoMapper's releases.

16.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 @​bluefossa for responsibly disclosing this issue.

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

16.1.0

What's Changed

New Contributors

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

16.0.0

What's Changed

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

16.0.0-beta-1

What's Changed

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

This release is a beta release that introduces .NET 10 support and package signing. Signed packages means going forward packages can be validated against trusted authorities that the package has been published by Lucky Penny Software and not tampered with.

15.1.0

What's Changed

New Contributors

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

15.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.

15.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

14.0.0

What's Changed

New Contributors

Full Changelog: LuckyPennySoftware/AutoMapper@v13.0.1...v14.0.0

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

---
updated-dependencies:
- dependency-name: AutoMapper
  dependency-version: 16.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Mar 14, 2026
@DocSvartz
Copy link
Copy Markdown
Contributor

@andrerav @stagep As far I understand, this doesn't pose a threat to mapster.

Automapper is now released under a dual license, but since we provide the source code, can we use 16.1.1 without purchasing a license or should we also change the license for benchmark to RPL-1.5?

@andrerav
Copy link
Copy Markdown
Member

@DocSvartz @stagep In my opinion, this "vulnerability" is a complete joke. It's a recursive mapping with max recursion depth disabled. What would anyone expect to happen? Mapster also has this "vulnerability" if you don't use any of the well-documented mechanisms that can prevent it: https://github.com/MapsterMapper/Mapster/wiki/Object-references

@stagep
Copy link
Copy Markdown

stagep commented Mar 16, 2026

@DocSvartz @stagep In my opinion, this "vulnerability" is a complete joke. It's a recursive mapping with max recursion depth disabled. What would anyone expect to happen? Mapster also has this "vulnerability" if you don't use any of the well-documented mechanisms that can prevent it: https://github.com/MapsterMapper/Mapster/wiki/Object-references

I guess it would cause a Map Overflow exception :)

@DocSvartz
Copy link
Copy Markdown
Contributor

@andrerav @stagep It looks like the security alert has disappeared. :)
the link no longer leads anywhere

@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Mar 16, 2026

Superseded by #866.

@dependabot dependabot bot closed this Mar 16, 2026
@dependabot dependabot bot deleted the dependabot/nuget/src/Benchmark/AutoMapper-16.1.1 branch March 16, 2026 13:45
@DocSvartz
Copy link
Copy Markdown
Contributor

DocSvartz commented Mar 16, 2026

mapper for the described case

[TestMethod]
public void Cyrcular()
{
    var root = new Circular() { Counter = -1 };
    var current = root;
    for (int i = 0; i < 30000; i++)
    {
        current.Self = new Circular() { Counter = i};
        current = current.Self;
    }

    var result = root.AdaptFromCercular();
}
 public class CircularResult
 {
     public int Counter { get; set; }
     public CircularResult Self { get; set; }
 }


 public class Circular 
 { 
     public int Counter {  get; set; }
     public Circular Self { get; set; } 
 }
 public static class Helper
 {
     public static List<Circular> GetNestedObjects(this Circular start)
     {
         if (start == null || start.Self == null)
             return new List<Circular>();

         var resultList = new List<Circular>(30000);
         var currentObject = start;

         resultList.Add(currentObject);

         while (currentObject != null && currentObject.Self != start && !resultList.Contains(currentObject.Self))
         {
             currentObject = currentObject.Self;
             resultList.Add(currentObject);
         }

         return resultList;
     }

     public static CircularResult AdaptFromCercular(this Circular data)
     {
          var list = data.GetNestedObjects();

         TypeAdapterConfig<Circular, CircularResult>
             .NewConfig()
             .Ignore(x => x.Self);


          var result = list[0].Adapt<CircularResult>();
          var current = result;

         for (int i = 1; i < list.Count; i++)
         {
             current.Self = list[i].Adapt<CircularResult>();
             current = current.Self;
         }

         return result;
     }
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants