What to do3 steps
Upgrade log4j-core to 2.17.1, 2.12.4 or 2.3.2.
Use 2.17.1 on Java 8, 2.12.4 on Java 7 and 2.3.2 on Java 6.
Find every copy, not only your own dependencies.
Include shaded and nested JARs in vendor products.
Move Log4j 1.x to Log4j 2.
Log4j 1.x is not affected by this CVE but is end of life. Check for
JMSAppender(CVE-2021-4104).
Are you affected?only if all are true
- The app uses log4j-core 2.0-beta9 to 2.14.1 (log4j-api alone is not affected).
- An attacker can get a string into a log message or its parameters: a header, a username, a search term.
Check your version
- Maven, in the project directory
mvn dependency:tree -Dincludes=org.apache.logging.log4j:log4j-core - Gradle, in the project directory
gradle dependencies | grep log4j-core - JARs on disk
find / -name 'log4j-core-*.jar' 2>/dev/null - Prompt for your own agent, read-onlyAm I affected by Log4Shell?
Read the prompt
Check whether the systems I am authorized to inspect are affected by Log4Shell (CVE-2021-44228). A JNDI lookup in Apache Log4j 2 log messages loads and runs code from an attacker's LDAP server: any logged string an attacker controls becomes remote code execution. It is exploitable under these conditions: - The app uses log4j-core 2.0-beta9 to 2.14.1 (log4j-api alone is not affected). - An attacker can get a string into a log message or its parameters: a header, a username, a search term. Fixed releases: - log4j-core: 2.3.2 (branch 2.3), 2.12.4 (branch 2.12), 2.17.1 (branch 2.17); before 2.0 is not affected 2.15.0 (Java 8), 2.12.2 (Java 7) and 2.3.1 (Java 6) closed this CVE; follow-up CVEs make 2.17.1, 2.12.4 and 2.3.2 the releases CISA asks for. Commands the catalog lists to find the version or the setting (read each one before you run it): - Maven, in the project directory: mvn dependency:tree -Dincludes=org.apache.logging.log4j:log4j-core - Gradle, in the project directory: gradle dependencies | grep log4j-core - JARs on disk: find / -name 'log4j-core-*.jar' 2>/dev/null What the catalog says to do on an affected system (report these, do not carry them out): 1. Upgrade log4j-core to 2.17.1, 2.12.4 or 2.3.2. 2. Find every copy, not only your own dependencies. 3. Move Log4j 1.x to Log4j 2. For each host, container image or application, report affected, not affected, fixed or unknown, with the evidence, and list anything you could not access. Work read-only: do not change configuration, restart services or send exploit input. More: https://log4j.2shell.wtf/log4shell
Affected versions3 branches
| log4j-core branch | Fixed in |
|---|---|
| 2.3 | 2.3.2 |
| 2.12 | 2.12.4 |
| 2.17 | 2.17.1 |
log4j-core before 2.0 is not affected.
2.15.0 (Java 8), 2.12.2 (Java 7) and 2.3.1 (Java 6) closed this CVE; follow-up CVEs make 2.17.1, 2.12.4 and 2.3.2 the releases CISA asks for.
Proof of concept1 public PoC
For testing systems you own or are authorized to test. A PoC repository can be fake or carry malware: read it before you run it.
- Open the PoC
Public proof of concept on GitHub. The most-starred educational PoC, kozmer/log4j-shell-poc, ships a vulnerable app and a script that stands up the LDAP and HTTP stage and runs code in its own lab.
Timeline4 events
Patched
log4j-core 2.15.0 on Maven Central
Added to CISA KEV
Added to CISA KEV
Exploited in the wild
CISA: active, widespread exploitation
Public PoC
Public proof of concept on GitHub. The most-starred educational PoC, kozmer/log4j-shell-poc, ships a vulnerable app and a script that stands up the LDAP and HTTP stage and runs code in its own lab.
Sources4 links
Sources checked on . This page tells you how to check and what to install. It cannot tell you that you are safe.
3 changes since it was published
- Linked the most-starred public proof of concept.
- Added a research source.
- Remediation steps got short titles; no fact changed.
