Actively exploited · Published Dec 14, 2021 · Assigned by apache

CVE-2021-45046Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack

Critical 9.0 Exploited Ransomware

In plain English

A critical-severity expression language injection in Apache Log4j from Apache Software Foundation. Attackers are actively exploiting it in the wild (listed by CISA on May 1, 2023). It has been used in ransomware campaigns. The chance it is exploited in the next 30 days is estimated at 100.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.0Critical
Exploit odds (30 days)100.0%top 0.0% of all CVEs
Exploited in the wildYesCISA KEV since May 1, 2023
Attack tooling3Metasploit, Nuclei, Public PoC

CISA guidance

Apply updates per vendor instructions.

Federal agencies must remediate by May 22, 2023.

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12apache-log4j22.16.0-1DEBIAN-CVE-2021-45046
Debian:13apache-log4j22.16.0-1DEBIAN-CVE-2021-45046
Debian:14apache-log4j22.16.0-1DEBIAN-CVE-2021-45046
Mavenorg.apache.logging.log4j:log4j-core2.16.0GHSA-7rjr-3q55-vv33
Mavenorg.apache.logging.log4j:log4j-core2.12.2GHSA-7rjr-3q55-vv33
Mavenorg.apache.logging.log4j:log4j-core2.3.1GHSA-7rjr-3q55-vv33
Mavenorg.ops4j.pax.logging:pax-logging-log4j21.9.2GHSA-7rjr-3q55-vv33
Mavenorg.ops4j.pax.logging:pax-logging-log4j21.11.11GHSA-7rjr-3q55-vv33
Mavenorg.ops4j.pax.logging:pax-logging-log4j21.10.8GHSA-7rjr-3q55-vv33
Mavenorg.ops4j.pax.logging:pax-logging-log4j22.0.12GHSA-7rjr-3q55-vv33

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache Log4j Apache Log4j2 – before 2.16.0

Weakness: CWE-917 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

References