{"id":"CVE-2026-32933","aliases":["CVE-2026-32933","GHSA-rvv3-g6hj-g44x"],"related":[],"kind":"vulnerability","state":"published","title":"AutoMapper Vulnerable to Denial of Service (DoS) via Uncontrolled Recursion","summary":"AutoMapper is a convention-based object-object mapper in .NET. Versions prior to 15.1.1 and 16.1.1 are 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. Versions 15.1.1 and 16.1.1 fix the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"AutoMapper is a convention-based object-object mapper in .NET. Versions prior to 15.1.1 and 16.1.1 are 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. Versions 15.1.1 and 16.1.1 fix the issue.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"AutoMapper es un mapeador de objetos a objetos basado en convenciones en .NET. Las versiones anteriores a la 15.1.1 y 16.1.1 son vulnerables a un ataque de denegación de servicio (DoS). Al mapear grafos de objetos profundamente anidados, la biblioteca utiliza llamadas a métodos recursivas sin imponer un límite de profundidad máxima predeterminado. Esto permite a un atacante proporcionar un grafo de objetos especialmente diseñado que agota la memoria de pila del hilo, lo que desencadena una 'StackOverflowException' y provoca la terminación de todo el proceso de la aplicación. Las versiones 15.1.1 y 16.1.1 solucionan el problema.","source":"nvd"}],"published":"2026-03-13T20:57:07.000Z","modified":"2026-09-10T03:50:41.821Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":">= 16.0.0, < 16.1.1","status":"affected"},{"version":"< 15.1.1","status":"affected"}],"vendor":"LuckyPennySoftware","product":"AutoMapper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"16.0.0","status":"affected","fixed":"16.1.1"}],"ecosystem":"NuGet","package":"AutoMapper","purl":"pkg:nuget/AutoMapper","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"15.1.1"}],"ecosystem":"NuGet","package":"AutoMapper","purl":"pkg:nuget/AutoMapper","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"15.1.1"},{"status":"affected","introduced":"16.0.0","fixed":"16.1.1"}],"vendor":"luckypennysoftware","product":"automapper","cpe":"cpe:2.3:a:luckypennysoftware:automapper:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/LuckyPennySoftware/AutoMapper/security/advisories/GHSA-rvv3-g6hj-g44x","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/LuckyPennySoftware/AutoMapper/commit/0afaf1e91648fca1a57512e94dd00a76ee016816","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v15.1.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/LuckyPennySoftware/AutoMapper/releases/tag/v16.1.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32933","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/LuckyPennySoftware/AutoMapper","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/LuckyPennySoftware/AutoMapper/discussions/4624","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-03-20T20:02:49.448Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32933","url":"https://www.cve.org/CVERecord?id=CVE-2026-32933","licence":"CVE Terms of Use","modified":"2026-03-20T20:02:58.558Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rvv3-g6hj-g44x","url":"https://github.com/advisories/GHSA-rvv3-g6hj-g44x","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:41.821Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32933","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32933","licence":"Public domain","modified":"2026-06-17T10:36:35.263Z"}],"updatedAt":"2026-11-25T22:59:16.264Z","epss":{"score":0.00597,"percentile":0.49883,"date":"2026-12-01T12:00:22.000Z"}}