Remote code execution via recursive Thread Context lookup
Published Dec 14, 2021 · Updated Oct 21, 2025
Expression-language injection in Apache Log4j Core before 2.16.0 allows remote attackers to execute code through crafted Thread Context data. In a non-default Pattern Layout, recursive substitution evaluates attacker-controlled MDC values as Lookup expressions, allowing a JNDI pattern to reach an external naming service. Exploitation requires control of data placed in the Thread Context Map and the vulnerable layout configuration; successful attacks can disclose data or execute code in the application process.
Summary
What happened
Expression-language injection in Apache Log4j Core before 2.16.0 allows remote attackers to execute code through crafted Thread Context data. In a non-default Pattern Layout, recursive substitution evaluates attacker-controlled MDC values as Lookup expressions, allowing a JNDI pattern to reach an external naming service. Exploitation requires control of data placed in the Thread Context Map and the vulnerable layout configuration; successful attacks can disclose data or execute code in the application process.
The record
- CVE
- CVE-2021-45046
- Published
- Dec 14, 2021
- Updated
- Oct 21, 2025
- Vendor
- The Apache Software Foundation
- Product
- Apache Log4j
- Classifications
- CWE-917
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Dec 14, 2021CVE publishedPublication date reported by the CVE source.
- May 1, 2023Exploitation reportedCISA Known Exploited Vulnerabilities Catalog listing
- Oct 21, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=Apache Log4j2 <2.16.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GitHub Security Lab JNDI mitigation-bypass demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Reported exploitation
- CISA Known Exploited Vulnerabilities Catalog listingknown exploited catalog
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo