Cybersecurity glossary

What is Log4Shell (CVE-2021-44228)?

Learn what Log4Shell (CVE-2021-44228) is, how Log4j JNDI lookup enabled remote code execution, which systems were exposed, and which patching, WAF, and logging hygiene steps remain essential.

Application securityUpdated August 11, 2026
Also known asLog4ShellCVE-2021-44228Log4j JNDI RCE

Definition

Log4Shell, primarily tracked as CVE-2021-44228, is a critical remote code execution vulnerability in Apache Log4j 2 where attacker-controlled log input could trigger JNDI lookups (commonly LDAP) that load and execute remote code—often with a single malicious string reaching an application log statement.

Why Log4Shell mattered

In December 2021, a single feature in a ubiquitous Java logging library became a planetary incident response drill. Log4Shell (CVE-2021-44228) showed that untrusted data reaching a log statement could become remote code execution through JNDI message lookups in Apache Log4j 2.

The vulnerability scored critical, was trivial to probe with strings like ${jndi:ldap://...}, and hid inside transitive dependencies few teams had inventoried. Cloud providers, Minecraft servers, enterprise apps, and security appliances were all in the blast radius within hours of public proof-of-concepts.

What CVE-2021-44228 actually is

Log4j 2 supported lookups that could resolve variables inside log messages. When attacker-controlled input was logged, a JNDI lookup could contact an attacker server and cause the JVM to load remote classes or otherwise execute attacker-influenced code—depending on JDK versions and gadget conditions.

Vulnerable component

Apache Log4j 2 message lookup / JndiLookup handling in affected releases.

Trigger

Attacker-influenced strings logged by the application—headers, form fields, user agents, names.

Common pivot

JNDI over LDAP (also RMI and other URL contexts in variants) returning a malicious reference.

Impact

Remote code execution with the privileges of the logging process—often a full host compromise path.

Follow-on CVEs addressed incomplete mitigations and related denial-of-service or bypass issues. Effective response meant tracking the whole Log4j advisory thread, not a one-time jar swap rumor.

How Log4Shell exploitation works

1

Inject a lookup string

Place ${jndi:...} (or obfuscated variants) into any input likely to be logged.

2

Reach a log call

Application code logs the tainted value—error handlers and ‘helpful’ debug logs were frequent paths.

3

Log4j performs JNDI

Vulnerable Log4j resolves the lookup and contacts the attacker-controlled naming service.

4

Deliver a malicious reference

LDAP/RMI responses steer the JVM toward remote class loading or other dangerous resolutions.

5

Execute attacker code

Payload runs in-process; attackers establish shells, drop ransomware, or mine cryptocurrency.

WAF signatures helped early, but obfuscation and nested lookups taught defenders not to rely on blocking alone.

PropertyLog4ShellShellshockCommand injection
IdentifierCVE-2021-44228 (+ follow-ons)CVE-2014-6271 (+ related)Many app-specific CVEs
Trusted subsystem abusedLogging / JNDI lookupsBash function export parsingOS command construction
Typical trigger fieldAny logged HTTP/user inputCGI environment variablesArguments concatenated into shells
Language ecosystemJava / JVMUnix shells / CGIAny language calling a shell
Primary fixUpgrade Log4j; disable JNDI lookupsPatch Bash; reduce CGI exposureAvoid shell; parameterize APIs

Who was affected

Any Java application or appliance shipping a vulnerable Log4j 2 core—directly or via nested jars—was potentially exposed. That included custom Spring apps, Elasticsearch-era stacks, enterprise SaaS backends, network devices with embedded JVMs, and developer tools people forgot were Internet-reachable.

Because logging is cross-cutting, teams that only scanned “web frameworks” missed libraries pulled in by unrelated modules. Software bill of materials (SBOM) discipline became a board-level conversation almost overnight.

Mitigations and response lessons

Upgrade Log4j

Move to Apache-recommended fixed 2.x releases and keep following the project security page for revisions.

Remove JndiLookup when needed

Emergency hotfixes included deleting JndiLookup classes from jars when immediate upgrades were impossible.

Constrain egress

Block unexpected outbound LDAP/RMI/JRMP from application subnets to limit exploit completion.

Hunt recursively

Scan filesystems and images for log4j-core jars, including fat jars and old container layers.

What practitioners should do today

  • Maintain an inventory of Log4j (and other logging frameworks) across repos, containers, and vendor appliances.
  • Ensure runtime versions match current Apache fixed releases—not interim emergency builds from 2021 folklore.
  • Prevent untrusted input from being interpreted as code or lookup syntax in any logging pipeline.
  • Restrict egress from app tiers; alert on LDAP/RMI connections to the Internet.
  • Include transitive dependency scanning in CI and production image admission controls.
  • Review detection content for JNDI exploit strings and post-exploitation reverse shells.
  • Treat vendor ‘not affected’ claims as unverified until configuration and embedded jar evidence is reviewed.
  • Practice tabletop incident response for library-level RCEs with incomplete asset inventories.

Lessons Log4Shell left for engineering

Log4Shell taught that convenience features in shared libraries are part of your attack surface. It taught that SBOMs and recursive jar inspection are operational necessities. It also taught humility about “we only log trusted data”—because trust boundaries leak through proxies, user agents, and error messages.

Finally, it showed that patching velocity and egress control can decide whether a critical CVE becomes a contained scramble or a breach.

The practical takeaway

Log4Shell (CVE-2021-44228) turned Log4j 2 JNDI message lookups into remote code execution when attacker strings were logged. Keep Log4j updated, eliminate dangerous lookup features, constrain outbound naming protocols, and assume every Java workload needs continuous dependency visibility—not a one-time December 2021 fire drill.

Related security terms

Frequently asked questions

What is Log4Shell in simple terms?

A bug in the popular Log4j logging library let attackers put a special string into anything that gets logged—like a username or HTTP header—and trick the server into downloading and running their code.

What is CVE-2021-44228?

CVE-2021-44228 is the primary critical vulnerability ID for the Log4j 2 JNDI lookup remote code execution issue widely called Log4Shell. Related CVEs addressed follow-on bypasses and hardening gaps.

Which Log4j versions were affected?

Apache Log4j 2 versions from 2.0-beta9 through 2.14.1 were the core RCE set for CVE-2021-44228. Operators had to track subsequent releases (2.15, 2.16, 2.17.x and later guidance) as additional issues emerged.

Did every logged string get you RCE?

Exploitation required a vulnerable Log4j 2 configuration path that processed message lookups, reachable untrusted input that was logged, and outbound connectivity allowing JNDI/LDAP (or similar) retrieval. Many apps met those conditions.

Is Log4j 1.x the same bug?

Log4j 1.x is end-of-life and has other serious issues, but CVE-2021-44228 specifically targets Log4j 2’s JNDI message lookup behavior. Do not treat ‘we use Log4j1’ as a complete risk dismissal without a full review.

How do you mitigate Log4Shell?

Upgrade to a fixed Log4j 2 release per current Apache guidance, remove or disable JndiLookup where applicable, block egress to unexpected LDAP/RMI destinations, and scan dependencies recursively including transitive jars.

Why was impact so widespread?

Log4j 2 is embedded deeply in Java enterprise software, cloud services, and appliances—often transitively—so a single logging feature became a global Internet emergency.

References

Explore authoritative guidance and frameworks related to log4shell (cve-2021-44228).

Explore every security definition

Return to the glossary to search by term, alias, starting letter, or security category.

Browse glossary