CVE-2021-45046
Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack
Also known as GHSA-7rjr-3q55-vv33
Mitigation
- Upgrade org.apache.logging.log4j:log4j-core to one of 2.16.0, 2.12.2, 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.8, 1.11.11, 2.0.12 (or later in the same release line).
Who should check
- Projects that depend on Maven package org.apache.logging.log4j:log4j-core (>= 2.13.0, < 2.16.0)
- 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 Log4j >= Apache Log4j2, < 2.16.0
Vulnerability facts
- Affected
- org.apache.logging.log4j:log4j-core >= 2.13.0, < 2.16.0; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2
- Fixed in
- 2.16.0, 2.12.2, 2.3.1, 1.9.2, 1.10.8, 1.11.11, 2.0.12
- Exploited in the wild
- Yes: in CISA KEV since 2023-05-01; federal due date 2023-05-22; known ransomware use
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 99.98% chance of exploitation in 30 days (percentile 100, 2026-11-26)
- CWE
- CWE-917
- Modified
Description
It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in an information leak and remote code execution in some environments and local code execution in all environments. Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) fix this issue by removing support for message lookup patterns and disabling JNDI functionality by default.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.apache.logging.log4j:log4j-core | >= 2.13.0, < 2.16.0 | 2.16.0, 2.12.2, 2.3.1 | osv |
| Maven org.ops4j.pax.logging:pax-logging-log4j2 | >= 1.8.0, < 1.9.2 | 1.9.2, 1.10.8, 1.11.11, 2.0.12 | osv |
| Apache Software Foundation Apache Log4j | >= Apache Log4j2, < 2.16.0 | — | cvelist |
Timeline
- 2021-12-14 Published
- 2023-05-01 Added to CISA KEV (exploited in the wild)
- 2023-05-22 CISA remediation due date for US federal agencies
- 2026-10-02 Last modified
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-45046. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-45046.md Affected: org.apache.logging.log4j:log4j-core >= 2.13.0, < 2.16.0; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2 Fixed in: 2.16.0, 2.12.2, 2.3.1, 1.9.2, 1.10.8, 1.11.11, 2.0.12 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 Log4j: 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
- https://logging.apache.org/log4j/2.x/security.html
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd
- https://www.debian.org/security/2021/dsa-5022
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EOKPQGV24RRBBI4TBZUDQMM4MEH7MXCY/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIG7FZULMNK2XF6FZRU4VWYDQXNMUGAJ/
- https://nvd.nist.gov/vuln/detail/CVE-2021-45046
Other
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032
- https://www.oracle.com/security-alerts/alert-cve-2021-44228.html
- https://www.cve.org/CVERecord?id=CVE-2021-44228
- http://www.openwall.com/lists/oss-security/2021/12/14/4
- https://www.kb.cert.org/vuls/id/930724
- https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdf
- https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.html
- http://www.openwall.com/lists/oss-security/2021/12/15/3
- https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf
- http://www.openwall.com/lists/oss-security/2021/12/18/1
- https://cert-portal.siemens.com/productcert/pdf/ssa-397453.pdf
- https://cert-portal.siemens.com/productcert/pdf/ssa-479842.pdf
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://security.gentoo.org/glsa/202310-16
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-45046
- https://www.openwall.com/lists/oss-security/2021/12/18/1
- https://www.openwall.com/lists/oss-security/2021/12/15/3
- https://www.openwall.com/lists/oss-security/2021/12/14/4
- https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd
- https://logging.apache.org/security.html#CVE-2021-45046
- 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://github.com/apache/logging-log4j2/compare/rel/2.3...rel/2.3.1
FAQ
Is CVE-2021-45046 being exploited?
Yes. CISA lists CVE-2021-45046 in its Known Exploited Vulnerabilities catalog since 2023-05-01, which means attacks have been seen. No public exploit code is known. EPSS estimates a 99.98% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-45046?
Critical: CVSS 9.0 (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-45046?
org.apache.logging.log4j:log4j-core >= 2.13.0, < 2.16.0; org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2.
Is there a fix for CVE-2021-45046?
Yes. Fixed in 2.16.0, 2.12.2, 2.3.1, 1.9.2, 1.10.8, 1.11.11, 2.0.12. Upgrade org.apache.logging.log4j:log4j-core to one of 2.16.0, 2.12.2, 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.8, 1.11.11, 2.0.12 (or later in the same release line).
How do I check if I'm affected by CVE-2021-45046?
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.