CVE-2021-45105Apache Log4j2 does not always protect from infinite recursion in lookup evaluation
- 5.9MediumCVSS base score
- 100.0%Exploitation in 30 daysEPSS · top 0.1% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
Apache Log4j2 versions 2.0-alpha1 through 2.16.0 (excluding 2.12.3 and 2.3.1) did not protect from uncontrolled recursion from self-referential lookups. This allows an attacker with control over Thread Context Map data to cause a denial of service when a crafted string is interpreted. This issue was fixed in Log4j 2.17.0, 2.12.3, and 2.3.1.
Timeline
ID reserved
By apache
- 2 days later
· 2 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | Medium5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 100.0% · top 0.1% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.9.
Affected products
Apache Software Foundation · Apache Log4j2
- affected log4j-core – < 2.17.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.apache.logging.log4j:log4j-coreGHSA-p6xc-xr62-6r2g (opens in a new tab)
- Mavenorg.ops4j.pax.logging:pax-logging-log4j2GHSA-p6xc-xr62-6r2g (opens in a new tab)
What to do
Workaround: Implement one of the following mitigation techniques: * Java 8 (or later) users should upgrade to release 2.17.0. Alternatively, this can be mitigated in configuration: * In PatternLayout in the logging configuration, replace Context Lookups like `${ctx:loginId}` or `$${ctx:loginId}` with Thread Context Map patterns (%X, %mdc, or %MDC). * Otherwise, in the configuration, remove references to Context Lookups like `${ctx:loginId}` or `$${ctx:loginId}` where they originate from sources external to the application such as HTTP headers or user input.
References
References13
- https://logging.apache.org/log4j/2.x/security.html (opens in a new tab)x_refsource_MISCx_transferred
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032 (opens in a new tab)x_refsource_CONFIRMx_transferred
- VU#930724 (opens in a new tab)third-party-advisoryx_refsource_CERT-VNx_transferred
- 20211210 Vulnerabilities in Apache Log4j Library Affecting Cisco Products: December 2021 (opens in a new tab)vendor-advisoryx_refsource_CISCOx_transferred
- [oss-security] 20211218 CVE-2021-45105: Apache Log4j2 does not always protect from infinite recursion in lookup evaluation (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- DSA-5024 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://security.netapp.com/advisory/ntap-20211218-0001/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://www.zerodayinitiative.com/advisories/ZDI-21-1541/ (opens in a new tab)x_refsource_MISCx_transferred
- https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://www.oracle.com/security-alerts/cpujan2022.html (opens in a new tab)x_refsource_MISCx_transferred
- https://www.oracle.com/security-alerts/cpuapr2022.html (opens in a new tab)x_refsource_MISCx_transferred
- https://www.oracle.com/security-alerts/cpujul2022.html (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-2559 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-p6xc-xr62-6r2g (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-45105)Record last updated .