CVE-2021-45105Apache Log4j2 does not always protect from infinite recursion in lookup evaluation
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.
What to do
Likely to be exploited: EPSS gives a 100% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Debian, Maven, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | apache-log4j2 | Fixed | 2.17.0-0.20.04.1 | UBUNTU-CVE-2021-45105 |
| Ubuntu 18.04 | apache-log4j2 | Fixed | 2.12.4-0ubuntu0.1 | UBUNTU-CVE-2021-45105 |
| Ubuntu 16.04 | apache-log4j2 | Fix pending | UBUNTU-CVE-2021-45105 | |
| Debian 14 | apache-log4j2 | Fixed | 2.17.0-1 | DEBIAN-CVE-2021-45105 |
| Debian 13 | apache-log4j2 | Fixed | 2.17.0-1 | DEBIAN-CVE-2021-45105 |
| Debian 12 | apache-log4j2 | Fixed | 2.17.0-1 | DEBIAN-CVE-2021-45105 |
| Red Hat Enterprise Linux 8 | log4j12 | Not affected | ||
| Red Hat Enterprise Linux 8 | log4j12-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | log4j | Not affected | ||
| Red Hat Enterprise Linux 7 | log4j-javadoc | Not affected | ||
| Red Hat Enterprise Linux 7 | log4j-manual | Not affected | ||
| Red Hat Enterprise Linux 6 | log4j | Not affected | ||
| Red Hat Enterprise Linux 6 | log4j-javadoc | Not affected | ||
| Red Hat Enterprise Linux 6 | log4j-manual | Not affected | ||
| Maven library | org.apache.logging.log4j:log4j-core | Fixed | 2.3.1 | GHSA-p6xc-xr62-6r2g |
| Maven library | org.ops4j.pax.logging:pax-logging-log4j2 | Fixed | 2.0.13 | GHSA-p6xc-xr62-6r2g |
What the vendor says
As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Apache Software Foundation Apache Log4j2: affected: log4j-core to before 2.17.0; fixed in
2.17.0,2.12.3,2.3.1
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.
Vendor advisories:
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log… (vendor-advisory)
- https://www.debian.org/security/2021/dsa-5024 (vendor-advisory)
References
- https://logging.apache.org/log4j/2.x/security.html
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032
- https://www.kb.cert.org/vuls/id/930724
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd
- http://www.openwall.com/lists/oss-security/2021/12/19/1
- https://www.debian.org/security/2021/dsa-5024
- 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/cpujan2022.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.