CVE-2021-45046: Apache Log4j MDC JNDI Injection Through Incomplete Log4Shell Fix
- Vendors
- SiemensIntel CorporationCvatDebian ProjectSonicwallFedora ProjectApache Software Foundation
CVE-2021-45046 is a JNDI injection vulnerability in Apache Log4j Core caused by an incomplete fix for CVE-2021-44228 in Log4j 2.15.0. Certain non-default Pattern Layout configurations evaluate attacker-controlled Thread Context Map (MDC) data containing malicious JNDI lookup expressions. Affected layouts include Context Lookups or Thread Context Map conversion patterns such as %X, %mdc, and %MDC. Exploitation can cause information disclosure and code execution, including remote code execution in some environments.
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 data and execute arbitrary code with the privileges of the affected Java application, potentially compromising confidentiality, integrity, and availability. Remote code execution depends on the runtime environment; local code execution is also possible under the vulnerability's exploitation conditions. Affected deployments may additionally experience denial of service. The presence of Log4j alone does not establish exploitability because the vulnerable path requires particular non-default logging configurations and attacker-controlled MDC input.
Mitigation
If you can’t patch tonight, do this now.
If upgrading is not immediately possible, remove the JndiLookup class from every affected log4j-core archive and runtime classpath, following vendor-supported procedures, and restart affected applications. Setting log4j2.formatMsgNoLookups=true alone does not mitigate CVE-2021-45046. Restrict access to vulnerable services and outbound network connections from affected Java applications as defense-in-depth measures; network restrictions are not a complete substitute for removing the vulnerable functionality or patching.
Remediation
Patch, then assume compromise.
Upgrade Apache Log4j Core to a current, supported fixed release, preferably through the affected application's vendor-supported update. Releases identified as fixing this CVE are 2.16.0 for Java 8+, 2.12.2 for Java 7, and the maintenance release 2.3.1. Log4j 2.16.0 removes message lookup support and disables JNDI by default. These historical fixes do not address every subsequently disclosed Log4j vulnerability. Update embedded, shaded, and indirect dependencies, keep log4j-api compatible with log4j-core, and redeploy or restart affected applications.
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 26, 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 Apache Log4j Core to a current, supported fixed release, preferably through the affected application's vendor-supported update. Releases identified as fixing this CVE are 2.16.0 for Java 8+, 2.12.2 for Java 7, and the maintenance release 2.3.1.
- 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 26, 2026.
Recent activity
147 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.