CVE-2021-45046: Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack
CVE-2021-45046 affects 10 listed versions of Apache Log4j in the Dawnsentry catalogue. It is known to be exploited in the wild.
Affected products and versions
The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.
Apache Log4j
10 of 38 listed versions are affected. Fixed in 2.16.0, 2.12.3, 2.3.1. The newest release, 2.26.1, is not affected.
2.15.0 2.13.2 2.13.0 2.12.2 2.8.2 2.8.1 2.0 2.0-rc2 2.0-rc1 2.0-rc1-rc1
What it is
It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in an information leak and remote code execution in some environments and local code execution in all environments. Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) fix this issue by removing support for message lookup patterns and disabling JNDI functionality by default.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H (NVD)
Published by Apache Software Foundation on 14 December 2021. Last changed 17 June 2026. CISA lists it as used in ransomware campaigns. Exploit code is public (Metasploit or Nuclei).
Sources
- Vendor security bulletin
- Palo Alto Networks security advisory
- CVE record from Apache Software Foundation
- NVD
- CISA Known Exploited Vulnerabilities
Check one version you run: look CVE-2021-45046 up, or pick a product and version in the quick lookup.
Updated 2 December 2026.