CVSS 3.1
5.9 mediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HMedium (5.9). EPSS >99.9% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.logging.log4j:log4j-core 2.12.3, 2.17.0, 2.3.1.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:Horg.apache.logging.log4j:log4j-core (Maven): fixed in 2.12.3, 2.17.0, 2.3.1org.ops4j.pax.logging:pax-logging-log4j2 (Maven): fixed in 1.9.2, 1.10.9, 1.11.12, 2.0.13Explain CVE-2021-45105 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-45105?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-45105?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-45105 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the CNA's record in the CVE List.
| Product | Affected |
|---|---|
| Apache Software Foundation Apache Log4j2 | from log4j-core before 2.17.0 |
| Product | Fixed in |
|---|---|
| Apache Software Foundation Apache Log4j2 | 2.12.3 |
| Apache Software Foundation Apache Log4j2 | 2.3.1 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-p6xc-xr62-6r2g | Maven | org.apache.logging.log4j:log4j-core | >=2.4.0 <2.12.3 | 2.12.3 |
| GHSA-p6xc-xr62-6r2g | Maven | org.apache.logging.log4j:log4j-core | >=2.13.0 <2.17.0 | 2.17.0 |
| GHSA-p6xc-xr62-6r2g | Maven | org.apache.logging.log4j:log4j-core | <2.3.1 | 2.3.1 |
| GHSA-p6xc-xr62-6r2g | Maven | org.ops4j.pax.logging:pax-logging-log4j2 | >=1.8.0 <1.9.2 | 1.9.2 |
| GHSA-p6xc-xr62-6r2g | Maven | org.ops4j.pax.logging:pax-logging-log4j2 | >=1.10.0 <1.10.9 | 1.10.9 |
| GHSA-p6xc-xr62-6r2g | Maven | org.ops4j.pax.logging:pax-logging-log4j2 | >=1.11.0 <1.11.12 | 1.11.12 |
| GHSA-p6xc-xr62-6r2g | Maven | org.ops4j.pax.logging:pax-logging-log4j2 | >=2.0.0 <2.0.13 | 2.0.13 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 9 | apache-log4j2 | 2.12.3-0+deb9u1 | DLA-2852-1 |
| Debian | 10 | apache-log4j2 | 2.17.0-1~deb10u1 | DSA-5024-1 |
| Debian | 11 | apache-log4j2 | 2.17.0-1~deb11u1 | DSA-5024-1 |
| Debian | 12, 13, 14 | apache-log4j2 | 2.17.0-1 | DEBIAN-CVE-2021-45105 |
| Ubuntu | 18.04:LTS | apache-log4j2 | 2.12.4-0ubuntu0.1 | UBUNTU-CVE-2021-45105 USN-5222-1 |
| Ubuntu | 20.04:LTS | apache-log4j2 | 2.17.0-0.20.04.1 | UBUNTU-CVE-2021-45105 USN-5203-1 USN-5222-1 |
| Ubuntu | Pro:16.04:LTS | apache-log4j2 | no fix listed | UBUNTU-CVE-2021-45105 |
| Red Hat | jboss_enterprise_application_platform:7.4::el7 | eap7-log4j | 0:2.17.1-1.redhat_00001.1.el7eap | RHSA-2022:1296 |
| Red Hat | jboss_enterprise_application_platform:7.4::el8 | eap7-log4j | 0:2.17.1-1.redhat_00001.1.el8eap | RHSA-2022:1297 |
| Red Hat | red_hat_single_sign_on:7.5::el7 | rh-sso7-keycloak, rh-sso7-keycloak-server | 0:15.0.6-1.redhat_00001.1.el7sso | RHSA-2022:1462 |
| Red Hat | red_hat_single_sign_on:7.5::el8 | rh-sso7-keycloak, rh-sso7-keycloak-server | 0:15.0.6-1.redhat_00001.1.el8sso | RHSA-2022:1463 |
| openSUSE | Leap 15.2 | log4j | 2.17.0-lp152.3.12.1 | openSUSE-SU-2021:1605-1 |
| openSUSE | Leap 15.3 | log4j | 2.17.0-4.13.1 | openSUSE-SU-2021:4118-1 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · openSUSE.
Red Hat rates this Moderate.
Red Hat Product Security has performed an analysis of this flaw and has classified the Attack Complexity(AC) as High because there are multiple factors involved which are beyond attacker's control:
- The application has to use the logging configuration using a Context Map Lookup (for example, $${ctx:loginId}) which is a non-default Pattern Layout.
- The application developer has to use the map org.apache.logging.log4j.ThreadContext in the application code and save at-least one key (for example, ThreadContext.put("loginId", "myId");) in the ThreadContext map object.
- Attackers must also know this saved key name in order to exploit this flaw.
Note that saving keys in this map is a non-essential usage of log4j and just an optional feature provided. Refer to https://logging.apache.org/log4j/2.x/manual/lookups.html#ContextMapLookup to know more about the Context Map Lookup feature of Log4j.
Log4j 1.x is not impacted by this vulnerability. Note that only the log4j-core JAR file is impacted by this vulnerability. Applications using ONLY the log4j-api JAR file without the log4j-core JAR file are NOT impacted by this vulnerability.
Despite including a vulnerable version of Log4j 2.x, this vulnerability is not exploitable in Elasticsearch[0], as shipped in OpenShift Container Platform and OpenShift Logging. OpenShift 3.11 specifically does not contain any context lookups:
https://github.com/openshift/openshift-ansible/blob/release-3.11/roles/openshift_logging_elasticsearch/templates/log4j2.properties.j2
This vulnerability is therefore rated Low for Elasticsearch in OpenShift Container Platform and OpenShift Logging.
[0] https://discuss.elastic.co/t/apache-log4j2-remote-code-execution-rce-vulnerability-cve-2021-44228-esa-2021-31/291476#update-december-18-4
For Log4j 2 versions up to and including 2.16.0, this flaw can be mitigated by:
- In PatternLayout in the Log4j logging configuration, replace Context Lookups like ${ctx:loginId} or $${ctx:loginId} with Thread Context Map patterns (%X, %mdc, or %MDC) like %X{loginId}.
- Otherwise, in the Log4j logging 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.
| Product | Package | State | Advisory |
|---|---|---|---|
| OpenShift Logging 5.0 | openshift-logging/elasticsearch6-rhel8:v5.0.11-2 | Fixed 2022-01-10 | RHSA-2022:0047 |
| OpenShift Logging 5.1 | openshift-logging/elasticsearch6-rhel8:v6.8.1-82 | Fixed 2022-01-10 | RHSA-2022:0042 |
| OpenShift Logging 5.2 | openshift-logging/elasticsearch6-rhel8:v6.8.1-83 | Fixed 2022-01-10 | RHSA-2022:0043 |
| OpenShift Logging 5.3 | openshift-logging/elasticsearch6-rhel8:v6.8.1-84 | Fixed 2022-01-10 | RHSA-2022:0044 |
| Red Hat AMQ Streams 1.6.6 | Fixed 2022-01-20 | RHSA-2022:0219 | |
| Red Hat Data Grid 8.2.3 | log4j-core | Fixed 2022-01-20 | RHSA-2022:0205 |
| Red Hat Fuse 7.8.2, 7.9.1, 7.10.1 | log4j-core | Fixed 2022-01-20 | RHSA-2022:0203 |
| Red Hat Integration Camel Extensions for Quarkus 2.2 | Fixed 2022-01-20 | RHSA-2022:0222 | |
| Red Hat Integration Camel-K 1.6.3 | log4j-core | Fixed 2022-01-20 | RHSA-2022:0223 |
| Red Hat JBoss Enterprise Application Platform | org.apache.logging.log4j/log4j-api:2.17.1.redhat-00001 | Fixed 2022-01-20 | RHSA-2022:0216 |
| A-MQ Clients 2 | log4j-core | Not affected | |
| Red Hat AMQ Broker 7 | log4j-core | Not affected | |
| Red Hat build of Quarkus | log4j-core | Not affected | |
| Red Hat Decision Manager 7 | log4j-api | Affected | |
| Red Hat Enterprise Linux 6 | log4j | Not affected | |
| Red Hat Enterprise Linux 7 | log4j | Not affected | |
| Red Hat Enterprise Linux 8 | parfait:0.5/log4j12 | Not affected | |
| Red Hat Integration Camel Quarkus 1 | log4j-core | Affected | |
| Red Hat JBoss Enterprise Application Platform 6 | log4j | Not affected | |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | log4j-core | Not affected | |
| 18 more in the JSON and on Red Hat's page. | |||
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-45105.
Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).