Patchfirst
CVE-2021-45046 KEVRansomwarePublic exploit Critical · 9.0 EPSS >99.9%

Apache Log4j2 Deserialization of Untrusted Data Vulnerability

Apache · Log4j2

Summary

The flaw is an incomplete fix in Apache Log4j2 (Apache Log4j 2.15.0) for untrusted-data handling, which lets Thread Context Map input be interpreted as a JNDI Lookup pattern. An attacker who controls Thread Context Map input can exploit it when the logging configuration uses a non-default Pattern Layout with a Context Lookup or a Thread Context Map pattern, causing an information leak and, in some environments, remote code execution, or local code execution in all environments.

Official description · NVD

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.

Breakdown
85.4 / 100
Exploited
Yes, in CISA KEV
Reports
2
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. What they do

  2. What can follow

First seen exploited 8 days before it was disclosed. Public exploit code (Metasploit) was available 5 days before disclosure.

  1. First seen exploitedVulnCheck KEV evidence8 days before
  2. Public exploit codeMetasploit5 days before
  3. Disclosedday 0
  4. Added to CISA KEVknown ransomware use; EU database agrees+17 mo

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

See the family tree

A fix was bypassed or incomplete 2 times over 8 months. The latest fix listed for log4j-core is 2.25.3.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2021-44228Log4j2 Remote Code Execution10 Dec 2021KEV
  2. relatedHigh

    Why these are linked:

    CVE-2021-4104Deserialization of untrusted data in JMSAppender in Apache Log4j…14 Dec 2021
  3. same family
    This CVECVE-2021-45046Log4j2 Deserialization of Untrusted Data14 Dec 2021KEV
  4. incomplete fixHigh

    Why these are linked:

    • Stated in the CVE textIt was found that the original fix for log4j CVE-2021-44228 and CVE-2021-45046 in the OpenShift metering hive containers was incomplete, as not all JndiLookup.class files were removed.
    CVE-2021-4125It was found that the original fix for log4j CVE-⁠2021-⁠44228 and…24 Aug 2022

Fixes in log4j-coreMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.8.2CVE-2017-564517 Apr 2017
  2. 2.13.2CVE-2020-948827 Apr 2020
  3. 2.15.0CVE-2021-4422810 Dec 2021KEV
  4. 2.16.0CVE-2021-4504614 Dec 2021KEV
  5. 2.17.0CVE-2021-4510518 Dec 2021
  6. 2.17.1CVE-2021-4483228 Dec 2021
  7. 2.25.3CVE-2025-6816118 Dec 2025Latest listed

techniques

2 , grouped by in kill-chain order 2

ExecutionTA0002

MITRE CTID mapping of the KEV entry · primary impact

CVE 2021-45046 is a Log4J-related vulnerability that could enable enables an attacker to cause Remote Code Execution or other effects in certain non-default configurations. This specific vulnerability has been reported to have been leveraged in cryptomining and ransomware operations.

ImpactTA0040

MITRE CTID mapping of the KEV entry · follow-on activity

CVE 2021-45046 is a Log4J-related vulnerability that has been seen to be used in cryptomining and ransomware operations.

Detection

0 rules for this CVE · 112 general rules for its techniques

Rules for this CVE

0 that reference CVE-2021-45046 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

2 packages in 1 ecosystem. Main package: org.apache.logging.log4j:log4j-core.

Mavenorg.apache.logging.log4j:log4j-coreGHSA-7rjr-3q55-vv33

Upgrade to 2.17.1 or later

Fixes this CVE and 3 other known vulnerabilities in this package (CVE-2021-44228, CVE-2021-44832, +1).

Set the version to 2.17.1 or later in your pom.xml or build.gradle.

First fixed in 2.16.0 for CVE-2021-45046.

Affected versions, by release line

If you runUpgrade to
2.13.0 up to 2.16.02.17.1first fix for this CVE: 2.16.0
2.4.0 up to 2.12.22.12.4first fix for this CVE: 2.12.2
All versions before 2.3.1

Still affected on this line by CVE-2017-5645 (fixed in 2.8.2, a newer line).

2.3.2first fix for this CVE: 2.3.1

“Up to” means the second version is the fix and is not affected.

Other packages that bundle this code (1)

Forks, repackagings and products that include the affected code. Each has its own fixed version.

  • Mavenorg.ops4j.pax.logging:pax-logging-log4j2
    Affected: 2.0.0 up to 2.0.12; 1.11.0 up to 1.11.11; 1.10.0 up to 1.10.8; 1.8.0 up to 1.9.2Upgrade to 2.0.14 or later (older lines: 1.11.13, 1.10.9, 1.9.2)

Check your lockfile against all CVEs

What security researchers reported

Named in 2 threat reports
2 reportsLinkedInMicrosoft

Reports are matched by finding the exact id CVE-2021-45046 in their text; nobody has reviewed the match. One passage is shown per report, at most 320 characters, linked to the original.

LinkedInUndated

RaaS AvosLocker Incident Response Analysis

…above: vulnerabilities associated to Log4J were found on the VMWare Horizon Unified Access Gateways, UAG01 and UAG02, those were CVE-2021-44228 / CVE-2021-45046 / CVE-2021-45105 / CVE-2021-44832, which can potentially allow remote code execution on Unified Access Gateway by the low privilege non-root user named…

Original (opens in a new tab) ↗

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

22 links, grouped by NVD tag (21 duplicates merged)
↑ ↓ chooseEnter openEsc close