Log4j Vulnerability (CVE-2021-44228)

By
Anandhu Krishnan
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”.

Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.

Written by
Anandhu Krishnan
Anandhu Krishnan
Lead Engineer
Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 10 days
Find surface-level website security issues in under a minute
Free website security assessment
Experience the power of automated penetration testing & contextual reporting.