CVE-2021-44228 Log4Shell: Apache Log4j2 Remote Code Execution
Attackers can execute arbitrary code via crafted log messages in Apache Log4j2 when JNDI lookup is enabled.
- Exploited in the wild
- Since 10 Dec 2021
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-44228?
CVE-2021-44228 (Log4Shell) is a critical code injection vulnerability in Apple Xcode, published on 10 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.
Which versions are affected by CVE-2021-44228?
20 open source packages ship an affected version, including org.ops4j.pax.logging:pax-logging-log4j2, com.guicedee.services:log4j-core and org.apache.logging.log4j:log4j-core. It affects 143 products.
| Package | Affected | Fixed in |
|---|---|---|
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.10.0 | 1.10.8 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.10.0 | 1.10.8 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.11.0 | 1.11.10 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.11.0 | 1.11.10 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.8.0 | 1.9.2 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 1.8.0 | 1.9.2 |
14 more packages
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 2.0.0 | 2.0.11 |
org.ops4j.pax.logging:pax-logging-log4j2 Maven | From 2.0.0 | 2.0.11 |
com.guicedee.services:log4j-core Maven | All versions to 1.2.1.2-jre17 | None |
com.guicedee.services:log4j-core Maven | All versions to 1.2.1.2-jre17 | None |
org.apache.logging.log4j:log4j-core Maven | From 2.0-beta9 | 2.3.1 |
org.apache.logging.log4j:log4j-core Maven | From 2.0-beta9 | 2.3.1 |
org.apache.logging.log4j:log4j-core Maven | From 2.13.0 | 2.15.0 |
org.apache.logging.log4j:log4j-core Maven | From 2.13.0 | 2.15.0 |
org.apache.logging.log4j:log4j-core Maven | From 2.4 | 2.12.2 |
org.apache.logging.log4j:log4j-core Maven | From 2.4 | 2.12.2 |
org.xbib.elasticsearch:log4j Maven | All versions | None |
org.xbib.elasticsearch:log4j Maven | All versions | None |
uk.co.nichesolutions.logging.log4j:log4j-core Maven | All versions | None |
uk.co.nichesolutions.logging.log4j:log4j-core Maven | All versions | None |
Linux distribution packages (6)
log4j openSUSE:Leap 15.2 | All versions | 2.13.0-lp152.3.3.1 |
log4j openSUSE:Leap 15.2 | All versions | 2.13.0-lp152.3.6.1 |
logback openSUSE:Leap 15.2 | All versions | 1.2.8-lp152.2.3.2 |
log4j openSUSE:Leap 15.3 | All versions | 2.13.0-4.3.1 |
logback openSUSE:Leap 15.3 | All versions | 1.2.8-3.3.1 |
log4j openSUSE:Tumbleweed | All versions | 2.13.2-2.1 |
Products include Apache Log4j, Apple Xcode, Bentley Synchro, Bentley Synchro 4d, Cisco Advanced Malware Protection Virtual Private Cloud Appliance, Cisco Automated Subsea Tuning and 137 more.
How do I fix CVE-2021-44228?
Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to a fixed version for your release line: 1.10.8, 1.11.10, 1.9.2 or 2.0.11. US federal agencies must fix it by 24 Dec 2021.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2021-44228 being exploited?
Yes. Attackers have exploited CVE-2021-44228 in the wild since at least 10 Dec 2021, including in ransomware campaigns.
Public exploit code: 5 Metasploit modules, 3 Exploit-DB entries, 1 Nuclei template and 482 proofs of concept on GitHub.
Other vulnerabilities in Apple Xcode
- CVE-2021-45046 Apache Log4j2 Deserialization of Untrusted Data
- CVE-2022-23305 SQL injection in JDBC Appender in Apache Log4j V1
- CVE-2017-5645 Deserialization of Untrusted Data in Log4j
- CVE-2022-23302 Deserialization of untrusted data in JMSSink in Apache Log4j 1.x
- CVE-2023-26464 Apache Log4j 1.x (EOL) allows DoS in Chainsaw and SocketAppender
Sources
Also known as DEBIAN-CVE-2021-44228, DLA-2842-1, DSA-5020-1, GHSA-jfh8-c2jp-5v3q, MGASA-2021-0556, MINI-xf97-3r68-mwq9 and 12 more.