Quick answer: Log4Shell (CVE-2021-44228) is a critical vulnerability in Apache Log4j, a free logging library built into a huge number of Java applications. Disclosed in December 2021, it let attackers run code on a server simply by getting it to log a specially crafted text string. Because Log4j was hidden inside so many products, organizations struggled to find everywhere it was used.
| Key facts | |
|---|---|
| Disclosed | 9 to 10 December 2021 |
| Affected software | Apache Log4j 2, an open-source Java logging library |
| Vulnerability | CVE-2021-44228, remote code execution (maximum severity) |
| Discovered by | Chen Zhaojun of Alibaba Cloud’s security team |
| Exploited by | Cybercriminals and state-backed groups within hours of disclosure |
| Fix | Upgrade Log4j to a fixed version (2.17.1 or later recommended) |
Timeline
- November 2021: Chen Zhaojun of Alibaba Cloud reports the flaw privately to Apache.
- 9 to 10 December 2021: The flaw becomes public and mass scanning begins almost immediately.
- December 2021: CISA publishes guidance and requires federal agencies to fix affected systems.
What happened
Almost every application writes logs. Log4j is one of the most popular tools for doing that in Java. The Log4Shell flaw meant that if an attacker could get a vulnerable application to log text they controlled, for example in a username field or a web request header, the application could be tricked into downloading and running the attacker’s code.
CISA Director Jen Easterly called it one of the most serious vulnerabilities she had seen in her career.
Why it was so hard to fix
Log4j was rarely installed on its own. It was bundled inside commercial products, cloud services and internal applications. Many organizations did not know they were using it until vendors issued warnings, and fixes had to come from each vendor in turn.
Lessons for your organization
- Maintain a software bill of materials (SBOM) so you know which components your software contains.
- Ask vendors how quickly they patch critical third-party components.
- Use web application firewalls and egress filtering to block exploit attempts and outbound callbacks.
- Prioritize patching internet-facing systems first.
- Fund and support the open-source components your business depends on.
This incident is part of our guide to major cyber attacks and data breaches, which compares the biggest incidents and the patterns behind them. Read about zero-day exploits. To see whether the same weaknesses exist in your organization, take the free Cybersecurity Readiness Assessment.
Related reading
PHP CVE-2024-4577: How a PHP Flaw Led to Mass Server Hacks
SolarWinds Supply Chain Attack: The Hack Hidden in Software Updates
Best SAP Patch Management Software for Cybersecurity: Top 5 Tools
Frequently asked questions
What is Log4Shell?
A critical remote code execution vulnerability (CVE-2021-44228) in the Apache Log4j logging library, disclosed in December 2021.
Is Log4Shell still a risk?
Yes. Older applications and devices that were never updated can still be vulnerable and are still scanned for by attackers.
How do I fix Log4Shell?
Upgrade Log4j to a fixed version, apply vendor patches for products that include it and block outbound connections from servers that do not need them.





