CVE-2021-45105: Denial of Service via Uncontrolled Lookup Recursion in Apache Log4j 2
- Vendors
- SonicwallOracle CorporationNetAppDebian ProjectApache Software Foundation
Apache Log4j 2 versions 2.0-alpha1 through 2.16.0, excluding 2.12.3 and 2.3.1, fail to prevent uncontrolled recursion during evaluation of self-referential lookups. When a non-default PatternLayout contains a Context Lookup, an attacker who controls Thread Context Map (MDC) data can supply a crafted string that triggers recursive lookup evaluation and a StackOverflowError. This can crash the affected application and cause denial of service. The vulnerability is distinct from the JNDI-based remote code execution vulnerability known as Log4Shell.
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 can exhaust the affected execution thread's stack and disrupt or crash the application using Log4j, potentially making its services unavailable. The vulnerability affects availability; it does not itself provide arbitrary code execution, information disclosure, or modification of application data.
Mitigation
If you can’t patch tonight, do this now.
If upgrading is not immediately possible, 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. Do not assume that JNDI-focused Log4Shell workarounds address this recursive Context Lookup vulnerability.
Remediation
Patch, then assume compromise.
Upgrade Log4j to a supported release incorporating the fix. The first fixed releases are 2.17.0 for Java 8 and later, 2.12.3 for Java 7, and 2.3.1 for Java 6. These are minimum fixes for CVE-2021-45105, not assurances against subsequent vulnerabilities. For products bundling Log4j, apply the vendor's corresponding fixed product release or security update. Keep log4j-api and log4j-core versions aligned where 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 Dec 2, 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 to a supported release incorporating the fix. The first fixed releases 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 Dec 2, 2026.
Recent activity
75 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.