CVE-2021-45105: Uncontrolled Recursion Denial of Service in Apache Log4j2
- Vendors
- SonicwallOracle CorporationNetAppDebian ProjectApache Software Foundation
CVE-2021-45105 is an uncontrolled-recursion vulnerability in Apache Log4j2 versions 2.0-alpha1 through 2.16.0, excluding 2.12.3 and 2.3.1. When a non-default PatternLayout contains a Context Lookup, an attacker controlling Thread Context Map (MDC) data can supply a crafted self-referential lookup. Resolving the lookup triggers uncontrolled recursion and a StackOverflowError, potentially terminating the affected application and causing denial of service. This vulnerability is distinct from the Log4j JNDI remote code execution vulnerabilities.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation disrupts application availability through stack exhaustion during logging. The resulting StackOverflowError can terminate the affected application or process, interrupting services that depend on it. This vulnerability does not itself provide code execution, information disclosure, or modification of application data.
Mitigation
If you can’t patch tonight, do this now.
Replace Context Lookups in PatternLayout with Thread Context Map conversion patterns such as %X, %mdc, or %MDC. Alternatively, remove configuration references to Context Lookups whose values originate from external sources, including HTTP headers and user input. Restrict access to affected application interfaces until remediation is complete. Do not rely on JNDI-specific workarounds or the formatMsgNoLookups setting to address this recursion vulnerability.
Remediation
Patch, then assume compromise.
Upgrade Log4j Core to a supported release containing the fix. The first fixed versions are 2.17.0 for Java 8 and later, 2.12.3 for Java 7, and 2.3.1 for Java 6. Version 2.16.0 does not fix this vulnerability. Prefer current supported Java and Log4j releases rather than retaining obsolete branches. For applications bundling Log4j, install the corresponding vendor-supported update. Keep Log4j API and Log4j Core versions aligned when both are used.
Exploits
3 exploits validated by Mallory's analysis. Hidden: 9 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2021-45105 exploited in the wild?
- Yes. As of Nov 26, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2021-45105?
- Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2021-45105, the earliest disclosed Apr 3, 2022.
- Is there a patch for CVE-2021-45105?
- Upgrade Log4j Core to a supported release containing the fix. The first fixed versions are 2.17.0 for Java 8 and later, 2.12.3 for Java 7, and 2.3.1 for Java 6.
- What products are affected by CVE-2021-45105?
- Apache Software Foundation Log4j, Sonicwall 6bk1602-0aa12-0tp0 Firmware, Sonicwall 6bk1602-0aa22-0tp0 Firmware, Sonicwall 6bk1602-0aa32-0tp0 Firmware, Sonicwall 6bk1602-0aa42-0tp0 Firmware, and at least 112 more.
- How severe is CVE-2021-45105?
- CVE-2021-45105 has a CVSS v3.1 score of 5.9 (Medium) and an EPSS score of 100.0% (100th percentile) as of Nov 26, 2026.
Recent activity
72 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.