Details
Alert ID 40043-1
Alert Type Active
Status release
Risk High
CWE 117
WASC 20
Technologies Targeted Language / Java
Tags CVE-2021-44228
CWE-117
OUT_OF_BAND
OWASP_2017_A09
OWASP_2021_A06
WSTG-V42-INPV-11
More Info Scan Rule Help

Summary

Apache Log4j2 <=2.14.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.

Solution

Upgrade Log4j2 to version 2.17.1 or newer. In previous releases (>2.10) this behavior can be mitigated by setting system property "log4j2.formatMsgNoLookups" to "true" or by removing the JndiLookup class from the classpath (example: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class). Java 8u121 (see https://www.oracle.com/java/technologies/javase/8u121-relnotes.html) protects against remote code execution by defaulting "com.sun.jndi.rmi.object.trustURLCodebase" and "com.sun.jndi.cosnaming.object.trustURLCodebase" to "false".

Other Info

References

Code

org/zaproxy/zap/extension/ascanrules/Log4ShellScanRule.java