EFMapper 1.0.0

dotnet add package EFMapper --version 1.0.0
                    
NuGet\Install-Package EFMapper -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EFMapper" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EFMapper" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EFMapper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EFMapper --version 1.0.0
                    
#r "nuget: EFMapper, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EFMapper@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EFMapper&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EFMapper&version=1.0.0
                    
Install as a Cake Tool

EFMapper

A convention-based object-to-object mapper for .NET, hardened against recursion-based denial-of-service. EFMapper keeps the familiar AutoMapper 13.x API and call sites, so it can replace AutoMapper in existing applications with a package swap and a namespace change.

Why this fork exists

AutoMapper had three High-severity advisories for uncontrolled recursion (CWE-674). A deeply nested object graph could exhaust the thread stack and throw an uncatchable StackOverflowException, terminating the whole process:

Advisory CVE What was wrong Fix in EFMapper
GHSA-rvv3-g6hj-g44x CVE-2026-32933 No default depth limit for self-referential maps A default MaxDepth of 64 is applied when recursion is detected
GHSA-gpwp-5797-mjff CVE-2026-128081 MaxDepth bypassed by derived maps, object/interface members, dictionary/dynamic sources and recursive type converters Derived maps inherit MaxDepth; every runtime map call checks the stack and throws a catchable InsufficientExecutionStackException
GHSA-6vhm-j9h7-f9gh CVE-2026-128082 Depth counted after the destination was constructed, so constructor parameters / positional records recursed without bound Depth is counted before the destination is created

These are defense-in-depth measures. Keep validating and bounding input depth at your application boundary as well.

Install

dotnet add package EFMapper

The NuGet package ID is EFMapper; the assembly and namespace are EFMapper.

Getting started

Configure the types to map at startup:

using EFMapper;

var configuration = new MapperConfiguration(cfg =>
{
    cfg.CreateMap<Foo, FooDto>();
    cfg.CreateMap<Bar, BarDto>();
});

// Only during development; remove before release.
#if DEBUG
configuration.AssertConfigurationIsValid();
#endif

// Or register with DI and resolve IMapper.
var mapper = configuration.CreateMapper();

Then map:

var fooDto = mapper.Map<FooDto>(foo);
var barDto = mapper.Map<BarDto>(bar);

Recursion and depth limits

When EFMapper detects a self-referential type map it enables PreserveReferences and applies a default MaxDepth of 64 (the same default as System.Text.Json and Newtonsoft.Json).

If your graphs legitimately go deeper, raise the limit explicitly:

cfg.CreateMap<Node, NodeDto>().MaxDepth(128);

Constructor parameters and positional records honor the same limit. Recursion that cannot be bounded by the type graph (dictionary/dynamic sources, object/interface members, recursive type converters) fails with a catchable InsufficientExecutionStackException instead of overflowing the stack.

Migrating from AutoMapper

  1. Replace the package reference AutoMapper with EFMapper.
  2. Replace using AutoMapper; with using EFMapper;.

The public types (IMapper, MapperConfiguration, Profile, ProjectTo, the configuration expressions) keep their names and signatures.

Compatibility

  • Target framework: net10.0 (usable from .NET 10 and later).
  • API surface is kept aligned with AutoMapper 13.x.

License

MIT. This project is a fork of AutoMapper, copyright (c) 2010 Jimmy Bogard, and retains the original MIT notice. See LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 12/3/2026