CVE-2021-45046: Apache Log4j MDC JNDI Lookup Code Execution
- Vendors
- SiemensIntel CorporationCvatDebian ProjectSonicwallFedora ProjectApache Software Foundation
CVE-2021-45046 is an incomplete remediation of CVE-2021-44228 in Apache Log4j, including version 2.15.0. In certain non-default logging configurations, attacker-controlled Thread Context Map, also called Mapped Diagnostic Context (MDC), values can undergo JNDI lookup evaluation. The vulnerable configurations use a Pattern Layout containing a Context Lookup or Thread Context Map patterns such as %X, %mdc, or %MDC. Crafted MDC values containing JNDI lookup expressions can cause information disclosure and, depending on the environment, arbitrary code execution. Disabling message lookups alone does not eliminate this attack path.
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 disclose application information and enable arbitrary code execution with the privileges of the affected Java application. Remote code execution is possible in some environments; local code execution is possible across environments when the necessary exploitation conditions are met. Affected product configurations may also experience denial of service. Code execution can compromise application confidentiality, integrity, and availability; it does not inherently confer privileges beyond those held by the application.
Mitigation
If you can’t patch tonight, do this now.
If upgrading is not immediately possible, remove the JndiLookup class from affected log4j-core archives and the runtime classpath, following vendor guidance, and restart affected applications. Setting log4j2.formatMsgNoLookups=true is not sufficient to mitigate CVE-2021-45046. As defense in depth, restrict network access to affected services, restrict outbound connections, and run applications without unnecessary privileges. Network restrictions are not substitutes for removing the vulnerable lookup functionality or applying fixes.
Remediation
Patch, then assume compromise.
Upgrade log4j-core to a supported release that fixes this vulnerability. The issue-specific fixes are Log4j 2.16.0 for Java 8 and later, 2.12.2 for Java 7, and the 2.3.1 backport. These fixes remove message lookup support and disable JNDI functionality by default. Prefer a current supported release addressing subsequent Log4j vulnerabilities rather than treating these historical minimum versions as comprehensive remediation. Keep log4j-api and log4j-core versions aligned, update bundled and indirect dependencies, and redeploy affected applications. For vendor-packaged software, apply the vendor-supported product update.
Exploits
4 exploits validated by Mallory's analysis. Hidden: 20 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-45046 exploited in the wild?
- Yes. As of Nov 30, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on May 1, 2023.
- Is there a public exploit for CVE-2021-45046?
- Yes. Mallory tracks 4 public exploits or proofs of concept for CVE-2021-45046, the earliest disclosed Dec 15, 2021.
- Is there a patch for CVE-2021-45046?
- Upgrade log4j-core to a supported release that fixes this vulnerability. The issue-specific fixes are Log4j 2.16.0 for Java 8 and later, 2.12.2 for Java 7, and the 2.3.1 backport.
- What products are affected by CVE-2021-45046?
- Apache Software Foundation Log4j, Siemens 6bk1602-0aa12-0tp0 Firmware, Siemens 6bk1602-0aa22-0tp0 Firmware, Siemens 6bk1602-0aa32-0tp0 Firmware, Siemens 6bk1602-0aa42-0tp0 Firmware, and at least 50 more.
- How severe is CVE-2021-45046?
- CVE-2021-45046 has a CVSS v3.1 score of 9.0 (Critical) and an EPSS score of 100.0% (100th percentile) as of Nov 30, 2026.
Recent activity
150 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.