Skip to main content
Log4Shell: 60% of Java Projects Failed Before the BreachIncident
4 min readFor Security Engineers

Log4Shell: 60% of Java Projects Failed Before the Breach

What Happened

On December 9, 2021, security researchers disclosed CVE-2021-44228, a remote code execution vulnerability in Apache Log4j 2. Known as Log4Shell, it received a CVSS score of 10, indicating maximum severity. Attackers could execute arbitrary code on systems running a vulnerable version by sending a specially crafted string to any application that logged user input through Log4j.

The vulnerability affected not only applications directly importing Log4j but also those using it as an indirect dependency. According to Snyk, 60% of Java projects used Log4j indirectly, buried deep in dependency trees. Your application might import Library A, which imports Library B, which imports Log4j. You may not have chosen to use Log4j, but it's running in your production environment.

Timeline

December 9, 2021: CVE-2021-44228 was publicly disclosed. Proof-of-concept exploits appeared within hours.

December 10, 2021: Mass scanning began as attackers probed internet-facing applications. The Apache Software Foundation released Log4j 2.15.0.

December 13, 2021: Additional bypasses were discovered, leading to the release of Log4j 2.16.0.

December 14, 2021: CVE-2021-45046 was disclosed due to an incomplete fix in 2.15.0, prompting the release of Log4j 2.17.0.

December 18, 2021: A third vulnerability (CVE-2021-45105) was disclosed, and Log4j 2.17.1 was released.

Organizations had only days to identify every instance of Log4j across their infrastructure, determine exposure, and deploy patches. Many didn't know where to start.

Which Controls Failed or Were Missing

Dependency visibility failed. Most organizations couldn't answer, "Do we use Log4j?" Their build systems automatically pulled in hundreds of transitive dependencies, with no maintained inventory. Manual code review was ineffective when 60% of affected projects used Log4j indirectly.

Vulnerability scanning missed indirect dependencies. Traditional scanners focused on direct dependencies listed in pom.xml or build.gradle, failing to traverse the full dependency tree. Log4j, buried three levels deep, remained invisible until exploitation.

Patch deployment processes assumed time to test. Standard workflows expected a week or more for testing and approval. Log4Shell required patching within 24-48 hours. Without emergency patch procedures, organizations couldn't respond quickly enough.

Asset inventory was incomplete. Many organizations found Log4j in forgotten internal tools, developer environments, and third-party appliances. Without knowing what you're running, you can't protect it.

What the Relevant Standards Require

PCI DSS v4.0.1 Requirement 6.3.2 mandates maintaining an inventory of bespoke and custom software, including third-party components, to facilitate vulnerability and patch management. This is essential for incidents like Log4Shell. A complete software bill of materials (SBOM) must include transitive dependencies. Listing only direct imports means non-compliance.

NIST Cybersecurity Framework CSF v2.0 under Govern (GV.OC-03) requires integrating cybersecurity supply chain risk management into acquisition and procurement processes. This means understanding all software dependencies, including those pulled in by others.

ISO/IEC 27001:2022 Annex A.8.30 covers technical vulnerability management: "Information about technical vulnerabilities of information systems in use shall be obtained, the organization's exposure to such vulnerabilities evaluated, and appropriate measures taken." If 60% of your Java projects contain a vulnerability you didn't know about, you haven't met this control objective.

OWASP Top 10 2021: A06:2021-Vulnerable and Outdated Components highlights the risk of not knowing the versions of all components used, including nested dependencies. Standards require knowing what you're running to identify exposure when disclosures occur.

Lessons and Action Items for Your Team

Deploy software composition analysis (SCA) that maps transitive dependencies. Your SCA tool must traverse the complete dependency tree, not just direct imports. Test this by installing a clean version of a major framework and verifying your tool identifies every library it pulls in, five or six levels deep. Tools like Snyk, OWASP Dependency-Check, and GitHub Dependency Graph support this, but correct configuration is crucial.

Generate SBOMs for every application. Use CycloneDX or SPDX format and store these alongside your code. When the next Log4Shell occurs, you should be able to run a single query: grep -r "log4j-core" *.sbom.json. Manual investigation wastes precious time.

Implement contextual prioritization. Snyk's priority score for Log4Shell reached 1000, combining severity with reachability analysis and exploit availability. Your prioritization system needs similar context. A CVSS 10 vulnerability in a library your code never calls is lower priority than a CVSS 7 in a function you invoke on every request.

Create an emergency patch track. Document which changes can bypass your normal two-week testing cycle. Define approval authority—who can authorize a production deployment in four hours? Test this process quarterly so you know exactly who to call and which guardrails to skip when needed.

Monitor your dependencies continuously. Don't wait for quarterly scans. Configure your SCA tool to alert on new CVEs within hours. The time between disclosure and exploitation is shrinking. You need to know you're affected before your IDS starts alerting.

Test your dependency update process. Pick a non-critical dependency and force an upgrade. How long does it take? What breaks? Fix your process when the stakes are low, not during an active incident.

The Log4Shell incident demonstrated that modern software supply chains hide risks in unexpected places. Organizations that responded quickly already knew what they were running and had processes to update it swiftly. Build that capability before the next CVE-2021-44228 arrives.

Topics:Incident

You Might Also Like