CVE-2021-45105
Apache Log4j2 does not always protect from infinite recursion in lookup evaluation
Also known as GHSA-p6xc-xr62-6r2g
Mitigation
- Upgrade org.apache.logging.log4j:log4j-core to one of 2.12.3, 2.17.0, 2.3.1 (or later in the same release line).
- Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to one of 1.9.2, 1.10.9, 1.11.12, 2.0.13 (or later in the same release line).
- Vendor 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.
Who should check
- Projects that depend on Maven package org.apache.logging.log4j:log4j-core (>= 2.4.0, < 2.12.3)
- Projects that depend on Maven package org.ops4j.pax.logging:pax-logging-log4j2 (>= 1.8.0, < 1.9.2)
- Anyone running Apache Software Foundation Apache Log4j2 >= log4j-core, < 2.17.0
Vulnerability facts
- Affected
- org.apache.logging.log4j:log4j-core >= 2.4.0, < 2.12.3; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2
- Fixed in
- 2.12.3, 2.17.0, 2.3.1, 1.9.2, 1.10.9, 1.11.12, 2.0.13
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.9 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 100.00% chance of exploitation in 30 days (percentile 100, 2026-11-26)
- CWE
- CWE-20, CWE-674
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.apache.logging.log4j:log4j-core | >= 2.4.0, < 2.12.3 | 2.12.3, 2.17.0, 2.3.1 | osv |
| Maven org.ops4j.pax.logging:pax-logging-log4j2 | >= 1.8.0, < 1.9.2 | 1.9.2, 1.10.9, 1.11.12, 2.0.13 | osv |
| Apache Software Foundation Apache Log4j2 | >= log4j-core, < 2.17.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-45105. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-45105.md Affected: org.apache.logging.log4j:log4j-core >= 2.4.0, < 2.12.3; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2 Fixed in: 2.12.3, 2.17.0, 2.3.1, 1.9.2, 1.10.9, 1.11.12, 2.0.13 Steps: 1. Search this machine and project for org.apache.logging.log4j:log4j-core (Maven), org.ops4j.pax.logging:pax-logging-log4j2 (Maven), Apache Software Foundation Apache Log4j2: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Other
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032
- https://www.kb.cert.org/vuls/id/930724
- http://www.openwall.com/lists/oss-security/2021/12/19/1
- https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf
- https://security.netapp.com/advisory/ntap-20211218-0001/
- https://www.zerodayinitiative.com/advisories/ZDI-21-1541/
- https://cert-portal.siemens.com/productcert/pdf/ssa-501673.pdf
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.zerodayinitiative.com/advisories/ZDI-21-1541
- https://security.netapp.com/advisory/ntap-20211218-0001
- https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY
- https://lists.debian.org/debian-lts-announce/2021/12/msg00017.html
FAQ
Is CVE-2021-45105 being exploited?
There is no confirmed exploitation: CVE-2021-45105 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 100.00% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-45105?
Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2021-45105?
org.apache.logging.log4j:log4j-core >= 2.4.0, < 2.12.3; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2.
Is there a fix for CVE-2021-45105?
Yes. Fixed in 2.12.3, 2.17.0, 2.3.1, 1.9.2, 1.10.9, 1.11.12, 2.0.13. Upgrade org.apache.logging.log4j:log4j-core to one of 2.12.3, 2.17.0, 2.3.1 (or later in the same release line). Upgrade org.ops4j.pax.logging:pax-logging-log4j2 to one of 1.9.2, 1.10.9, 1.11.12, 2.0.13 (or later in the same release line). Vendor 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.
How do I check if I'm affected by CVE-2021-45105?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.