Skip to content

Commit 22504d1

Browse files
1 parent 1cfd06f commit 22504d1

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

advisories/github-reviewed/2026/03/GHSA-rvv3-g6hj-g44x/GHSA-rvv3-g6hj-g44x.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-rvv3-g6hj-g44x",
4-
"modified": "2026-03-20T21:20:05Z",
4+
"modified": "2026-03-20T21:20:06Z",
55
"published": "2026-03-13T20:57:07Z",
66
"aliases": [
77
"CVE-2026-32933"
88
],
99
"summary": "AutoMapper Vulnerable to Denial of Service (DoS) via Uncontrolled Recursion",
1010
"details": "### Summary\n\nAutoMapper 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.\n\n### Description\n\nThe 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.\n\nBecause 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.\n\n### Impact\n\n* **Availability:** An attacker can crash the application server, leading to a complete Denial of Service.\n* **Process Termination:** Unlike standard exceptions, this terminates the entire process, not just the individual request thread.\n\n### Proof of Concept (PoC)\n\nThe following C# code demonstrates the crash by creating a nested \"Circular\" object graph and attempting to map it:\n\n```csharp\nclass Circular { public Circular Self { get; set; } }\n\n// Setup configuration\nvar config = new MapperConfiguration(cfg => {\n cfg.CreateMap<Circular, Circular>();\n});\nvar mapper = config.CreateMapper();\n\n// Create a deeply nested object (28,000+ levels)\nvar root = new Circular();\nvar current = root;\nfor (int i = 0; i < 30000; i++) {\n current.Self = new Circular();\n current = current.Self;\n}\n\n// This call triggers the StackOverflowException and crashes the process\nmapper.Map<Circular>(root);\n\n```\n\n### Recommended Mitigation\n\n1. **Secure Defaults:** Implement a default `MaxDepth` (e.g., 32 or 64) for all mapping operations.\n2. **Configurable Limit:** Allow users to increase this limit if necessary, but ensure it is enabled by default to protect unsuspecting developers.",
11-
"severity": [
12-
{
13-
"type": "CVSS_V3",
14-
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
15-
}
16-
],
11+
"severity": [],
1712
"affected": [
1813
{
1914
"package": {
@@ -84,7 +79,7 @@
8479
"cwe_ids": [
8580
"CWE-674"
8681
],
87-
"severity": "HIGH",
82+
"severity": "LOW",
8883
"github_reviewed": true,
8984
"github_reviewed_at": "2026-03-13T20:57:07Z",
9085
"nvd_published_at": "2026-03-20T03:16:00Z"

0 commit comments

Comments
 (0)