CVE-2021-45046

Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack

  • Critical 9.0
  • Exploited: added to CISA KEV 1 May 2023
  • Used in ransomware campaigns

Description

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.

Key facts

Published
14 Dec 2021
Last changed
21 Oct 2025
Assigned by
apache
KEV added
1 May 2023
KEV fix due
22 May 2023
Used in ransomware
Yes, according to CISA
EPSS
99.977% likely to be exploited in the next 30 days, higher than 99.98% of CVEs (scores for 15 Nov 2026)
SSVC (CISA)
Exploitation: active; Automatable: no; Technical impact: total

Severity scores

Each score is shown as its source gave it. They are not averaged or merged.

  • 9.0CVSS 3.1, Criticalfrom CISA (ADP container)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

What to do

  • Apply updates per vendor instructions.CISA KEV required action

Historical context and remediation

This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.

No separately sourced impact summary is available on this page yet. Consult the description, version data and dated exploitation evidence.

Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.

Read the original CVE record.

Affected products

VendorProductVersions
Apache Software FoundationApache Log4j
  • Apache Log4j2 up to but excluding 2.16.0 (affected)

Timeline

  1. 14 Dec 2021 Published
  2. 1 May 2023 CVE-2021-45046 added to CISA KEV
  3. 1 May 2023 Added to the CISA KEV catalogue

Weakness

References