Log4j Vulnerability (CVE-2021-44228)

Published on 14 May 2024
Vulnerability

Description

Apache Log4j2 versions up to 2.14.1 are vulnerable to JNDI injection attacks, which can execute arbitrary code via LDAP and other JNDI endpoints if log messages or parameters are attacker-controlled and message lookup substitution is enabled. This vulnerability has been mitigated in Log4j 2.15.0, where the JNDI features are disabled by default.

Recommendation

Upgrade Log4j2 to version 2.17.1 or newer to address JNDI injection vulnerabilities. For versions earlier than 2.17.1, mitigate the risk by setting the system property “log4j2.formatMsgNoLookups” to “true” or removing the JndiLookup class from the classpath. Additionally, Java 8u121 and later protect against remote code execution by defaulting “com.sun.jndi.rmi.object.trustURLCodebase” and “com.sun.jndi.cosnaming.object.trustURLCodebase” to “false”.

Anandhu Krishnan
Written by
Lead Engineer

Anandhu is an accomplished Senior Lead Engineer with a strong focus on back-end development. His expertise lies in architecting and optimizing the core of software applications to ensure they run smoothly and efficiently. With a meticulous attention to detail and a deep understanding of data management and server-side operations, Anandhu has been a driving force behind the success of various back-end projects.

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo