Log4Shell (CVE-2021-44228): the logging library that shook the internet

One line of text in a log could give attackers full control of a server. Why Log4Shell still matters and how to make sure you are protected.

Publicly disclosed: 10 December 2021

Log4j is a popular Java library for writing logs, used inside thousands of products — from web applications and VPN appliances to games and industrial software. In December 2021 it became known that a specially crafted text string, written to a log, made Log4j load and run code from the attacker's server. Mass scanning started within hours.

CVESeverityAffectedFixed in
CVE-2021-44228Critical, CVSS 10.0Log4j 2.0-beta9 – 2.14.12.15.0; later fixes: 2.16.0, 2.17.1

Why it was so dangerous

The attack needed no login: it was enough that any user-controlled text — a username, a browser User-Agent, a chat message — reached the log. Many companies did not even know Log4j was inside the products they used.

How to protect

  1. Update Log4j to 2.17.1 or later (for Java 8) — this also closes the follow-up flaws CVE-2021-45046, CVE-2021-45105 and CVE-2021-44832.
  2. Ask vendors of appliances and business software whether their products include Log4j, and install their updates.
  3. Scan servers for vulnerable log4j-core JAR files, including those packed inside other archives.
  4. Limit outgoing internet traffic from servers — the attack depended on the server connecting out to the attacker.
  5. Keep a software inventory (SBOM) so the next library vulnerability can be found in hours, not weeks.

You cannot patch what you do not know you have.

Sources: Apache Log4j security, NVD CVE-2021-44228, CISA guidance.

Need help with this? Contact CySec for a free consultation.


All articles

Need help with this?

Our engineers can review your current setup and propose concrete improvements.