Log4Shell was a serious 2021 flaw in Log4j, a free tool many programs use to keep records.
This guide is for students, newcomers to IT and anyone who saw Log4Shell in the news and wondered why it mattered so much. You do not need to write code to be affected: Log4j can sit inside products your business already uses, without its name on the box.
In short
- Log4j is a free building block that many programs use to write down what they are doing.
- In December 2021 a flaw meant that a short piece of text, once written down by Log4j, could let a stranger run their own code.
- It was so serious because Log4j was hidden inside many products, and the flaw was easy to use.
- The fix is to update to a fixed version, ask suppliers if their products use it, and keep a list of the parts your software is built from.
What you will learn
- Explain what Log4j is and what went wrong, in plain words.
- Explain why one small part caused a worldwide scramble.
- Spot the questions to ask a supplier when a flaw like this is in the news.
- Check whether your team keeps a list of the parts inside its software.
- Record keeper (logging tool)
- a part of a program that writes down events, such as who signed in and what went wrong.
- Building block (library)
- ready-made code that developers add to their program instead of writing it themselves.
- Weak spot (vulnerability)
- a flaw in software that an attacker may be able to use.
What is Log4Shell?
Picture a minute-taker in a meeting who writes down everything people say. One day someone says, "Go and fetch the note at this address, and do what it says." A careful minute-taker would just write that down. This one gets up and does it.
Log4j is a minute-taker for software. Many programs use it to keep a record, called a log, of what happens. It is open source, which means its code is free for anyone to use and read. A group of volunteers looks after it at the Apache Software Foundation.[3]
Log4j had a handy feature called a lookup. Special text in a log line could tell Log4j to fetch a value from somewhere else. The flaw was that this text could point at a server run by an attacker. If an attacker could get their text into a log line, Log4j could load and run code from that server.[1] Running a stranger's code from afar is called remote code execution.
The flaw was named Log4Shell. A "shell" is the control panel of a computer, so the name hints that an attacker could take control.
Where the comparison stops working: a person would soon notice an odd request in a meeting. Software follows the rule it was given, every time, and nobody sees it happen.
Why does it matter?
Programs log many things that outsiders can type, such as a user name or a search. So lots of systems could be reached from the internet. The UK's cyber security agency called it potentially the most severe computer vulnerability in years, partly because little skill was needed to use it.[2]
If you run a small business
What could happen: a product you bought, such as a booking system, carries Log4j inside and nobody tells you.
Check this: ask each software supplier whether their product used Log4j and whether it is now fixed.
If you are new to IT work
What could happen: you update one server, but an old copy of Log4j still sits inside another product.
Check this: look for every place it might hide, not just the obvious one.
If you are learning to code
What could happen: a free building block you add brings a flaw you never read about.
Check this: keep a list of the building blocks in your project and watch for their updates.
Next: SBOMs for Beginners
What does it look like?
Here is a made-up log from a delivery firm's website. It shows how harmless and harmful lines can look much the same. The harmful part is shown as a placeholder only.
Example only. All values are made up.
# web log, Tidewater Logistics tracking page 10:02 search="parcel 0000-EXAMPLE" (1) 10:03 login-failed user="jo.example" (2) 10:04 search="[LOOKUP: fetch from attacker.example.invalid]" (3) 10:04 outbound call to attacker.example.invalid (4)
- A normal search. In a real file, this line would contain a customer's parcel number.
- A failed sign-in. The user name is logged, so it is text an outsider chose.
- A placeholder for the harmful text. In a real file, this line would contain a lookup pointing at the attacker's server.
- The server reaching out to a stranger's address straight after, which is a warning sign.
Why this is risky: the attacker never logs in. They only need their text to be written down by a program using an affected version of Log4j.[1]
The safer way: update Log4j to a fixed version, so lookups like line 3 are no longer followed. Many teams also limit which outside addresses their servers may contact, so a call like line 4 is blocked.
How does it work?
Here is the chain of events, in plain words. It is a description for defenders, not a recipe.
- The text. An attacker types special text into anything a program might log, such as a search box or a user name.
- The record. The program passes that text to Log4j to write down, as it would with any other text.
- The lookup. An affected version of Log4j reads the special text as an instruction and contacts the attacker's server.[1]
- The takeover. The server sends back code, and the program may run it with its own permissions.[1]
- The fix. Apache released fixed versions. Updating Log4j, or the product that contains it, closes the gap.[1]

Why was it hard to fix? Log4j was often buried several layers deep, inside a product that was inside another product. A US review board found there was no list of everyone who used Log4j, which made it hard for defenders to find.[3] The same board judged that vulnerable copies may stay in systems for many years, perhaps a decade or longer.[3]

A worked example
Leila Iyer is the office manager at Tidewater Logistics, a fictional delivery firm with forty staff. Yusuf Hollis is the outside IT helper who looks after its systems.
On a Saturday in December 2021, Leila hears about Log4Shell on the radio. She messages Yusuf: "Are we affected?"
Leila thinks of the minute-taker. The question is not "is it in the news?" but "do we have one of these record keepers that follows orders?"
Yusuf starts a list. Tidewater's own tracking website is the first item. He checks its building blocks and finds an affected Log4j version. He updates it to the fixed version the next day.
The harder part is the products they bought. Yusuf emails the suppliers of the warehouse system, the phone system and the payroll service. Two reply that they were not affected. The warehouse supplier says a fix is coming and suggests a temporary setting until then.
While they wait, Yusuf looks at the website's records for odd outbound calls since the news broke. He finds no warning signs in the records available to him. He also limits which outside addresses the servers may contact.
A week later the warehouse fix arrives, and Yusuf installs it. Leila asks him to keep the supplier list and the parts list up to date, so next time the first answer comes much faster.
What made the difference: they asked suppliers early, and they treated a missing answer as "not yet known", not as "safe".
Myths and mistakes
| What people think | What is true |
|---|---|
| We never installed Log4j, so we are fine. | It was often built into other products. Ask your suppliers.[2] |
| Log4Shell is old news. | A US review board expected vulnerable copies to stay in systems for years.[3] |
| The first update fixed everything. | Apache released further fixes for related flaws in the following days. Use a current fixed version.[1] |
| Only big companies were targets. | Scanning for the flaw spiked within two hours of it going public, according to the US review board. Scans hit systems whatever the size of the owner.[3] |
| Updating is the whole job. | Also check for signs of earlier misuse, and find copies hidden inside other products.[2] |
What can I do this week?
- Ask each software supplier if their product used Log4j, and if it is fixed now.
- Check that devices and apps install updates, and turn on automatic updates where you can.
- Ask your developers or IT helper for a list of the building blocks in your own software.
- Agree who watches for big security news and who decides what to do first.
Checklist
- Every system we run has been checked for Log4j, including products we bought.
- Any Log4j found is on a current fixed version.
- Each supplier has confirmed their status in writing.
- We keep a list of the parts inside our own software.
- Servers can contact only the outside addresses they need.
- Someone owns watching for urgent flaws and starting the response.
- We know where to report a suspected break-in.
Common questions
Is Log4Shell still a problem?
Yes, it can be. The fix has existed since December 2021, but old copies remain in systems that were never updated. A US review board expected vulnerable copies to remain for many years, so it is still worth checking older products and servers.
Do I need to do anything on my home computer or phone?
Keep your devices and apps up to date. That was the main advice to the public from the UK's cyber security agency. Most home users do not install Log4j themselves, but apps and devices may contain it, and updates bring the fixes.
What is the difference between Log4j and Log4Shell?
Log4j is the tool; Log4Shell is the nickname for one serious flaw in it. Log4j is a free logging tool from the Apache Software Foundation. Its official flaw number is listed in the sources, and the practitioner guide covers the related flaws.
How do I know if a product I use has Log4j inside?
Ask the supplier, and check their security notices. Many suppliers published statements in 2021. A list of parts, called a software bill of materials, also helps. In 2021 the US review board heard of no organisation using one to find Log4j.
Why did a free tool cause so much damage?
Because so many programs used it and so few owners knew. Free building blocks save time and are often well made. But each one becomes part of your software, so its flaws become yours, and you need to know which blocks you depend on.
Where next?
Ready for the detail? Read the practitioner guide: Log4Shell (CVE-2021-44228) Guide. It goes further into the affected versions and fixes, the related flaws and how teams detect and defend against attempts.
Also useful:
- Famous Vulnerabilities for Beginners
- The CISA KEV Catalogue for Beginners
- Open Source Risk and Software Composition Analysis for Beginners
- SBOMs for Beginners
Related NHI Mgmt Group resources: Zero-Day and Exploited Vulnerabilities Guide · Patch Management Guide · Vulnerability Management vs Patch Management
Key terms
- Log4Shell
- The common name for a critical 2021 flaw in Log4j that let logged text trigger an attacker's code.
- Logging
- Writing down system and security events so they can be reviewed later.
- Vulnerability
- A flaw or weakness in software or settings that an attacker may be able to abuse.
- Remote code execution
- A flaw that lets an attacker make a system run their code from afar.
- Patch
- A software update from the maker that fixes bugs or security flaws.
- CVE
- A standard number given to a publicly known software flaw, so everyone can refer to the same one.
- Software bill of materials
- A list of the parts that make up a piece of software, like an ingredients label.
Sources and further reading
- Apache Log4j Security Vulnerabilities (CVE-2021-44228, CVE-2021-45046, CVE-2021-45105). Apache Logging Services, Apache Software Foundation. https://logging.apache.org/security.html, accessed 28 Nov 2026.
- Log4j vulnerability: what everyone needs to know. National Cyber Security Centre, 14 December 2021. https://www.ncsc.gov.uk/information/log4j-vulnerability-what-everyone-needs-to-know, accessed 28 Nov 2026.
- Review of the December 2021 Log4j Event. Cyber Safety Review Board, US Department of Homeland Security, 11 July 2022. https://www.cisa.gov/sites/default/files/publications/CSRB-Report-on-Log4-July-11-2022_508.pdf, accessed 28 Nov 2026.