CVE-2021-45046
JSON

9.0criticalExploited

Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a denial of service attack

Severity
9.0critical CVSS:3.1 by CISA-ADP
Exploit likelihood
99.9% (higher than 99% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-7rjr-3q55-vv33

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

Product or packageVersionsReported by
Apache Software Foundation Apache Log4jfrom Apache Log4j2 before 2.16.0CVE List
org.apache.logging.log4j:log4j-core (Maven)from 2.13.0 before 2.16.0, from 2.4.0 before 2.12.2, before 2.3.1GitHub Advisory Database
org.ops4j.pax.logging:pax-logging-log4j2 (Maven)from 1.8.0 before 1.9.2, from 1.10.0 before 1.10.8, from 1.11.0 before 1.11.11, from 2.0.0 before 2.0.12GitHub Advisory Database
apache log4jfrom 2.0.1 before 2.12.2, from 2.13.0 before 2.16.0, 2.0NVD
cvat computer_vision_annotation_toolNot specifiedNVD
intel audio_development_kitNot specifiedNVD
intel datacenter_managerNot specifiedNVD
intel genomics_kernel_libraryNot specifiedNVD
intel oneapiNot specifiedNVD
intel secure_device_onboardNot specifiedNVD
intel sensor_solution_firmware_development_kitNot specifiedNVD
intel system_debuggerNot specifiedNVD

All scores

CISA-ADP9.0critical CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub9.0critical CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD9.0critical CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD5.1medium CVSS:2.0AV:N/AC:H/Au:N/C:P/I:P/A:P

Classification

CWE-502CWE-917

SSVC (CISA-ADP): exploitation active, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

Impact

The fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allow 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 a remote code execution (RCE) attack.

Affected packages

Only the org.apache.logging.log4j:log4j-core package is directly affected by this vulnerability. The org.apache.logging.log4j:log4j-api should be kept at the same version as the org.apache.logging.log4j:log4j-core package to ensure compatability if in use.

Mitigation

Log4j 2.16.0 fixes this issue by removing support for message lookup patterns and disabling JNDI functionality by default. This issue can be mitigated in prior releases (< 2.16.0) by removing the JndiLookup class from the classpath (example: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class).

Log4j 2.15.0 restricts JNDI LDAP lookups to localhost by default. Note that previous mitigations involving configuration such as to set the system property log4j2.formatMsgNoLookups to true do NOT mitigate this specific vulnerability.

NVD (es)

Se descubrió que la corrección para abordar CVE-2021-44228 en Apache Log4j versiones 2.15.0 estaba incompleta en ciertas configuraciones no predeterminadas. Esto podría permitir a los atacantes con control sobre los datos de entrada de Thread Context Map (MDC) cuando la configuración de registro utiliza un Pattern Layout no predeterminado con un Context Lookup (por ejemplo, $${ctx:loginId}) o un Thread Context Map pattern (%X, %mdc, o %MDC) para elaborar datos de entrada maliciosos utilizando un patrón JNDI Lookup que resulta en una fuga de información y ejecución de código remoto en algunos entornos y ejecución de código local en todos los entornos. Log4j versiones 2.16.0 (Java 8) y 2.12.2 (Java 7) solucionan este problema eliminando el soporte para los patrones de búsqueda de mensajes y deshabilitando la funcionalidad JNDI por defecto

CISA KEV

Apache Log4j2 contains a deserialization of untrusted data vulnerability due to the incomplete fix of CVE-2021-44228, where the Thread Context Lookup Pattern is vulnerable to remote code execution in certain non-default configurations.

References

https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032third-party-advisory, web
https://www.oracle.com/security-alerts/alert-cve-2021-44228.htmlthird-party-advisory, web
https://www.cve.org/CVERecord?id=CVE-2021-44228not-applicable, web
http://www.openwall.com/lists/oss-security/2021/12/14/4mailing-list, mitigation, third-party-advisory
https://logging.apache.org/log4j/2.x/security.htmlkev, mitigation, release-notes, vendor-advisory, web
https://www.kb.cert.org/vuls/id/930724third-party-advisory, us-government-resource, web
https://cert-portal.siemens.com/productcert/pdf/ssa-661247.pdfthird-party-advisory, web
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00646.htmlthird-party-advisory, web
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbdthird-party-advisory, vendor-advisory
http://www.openwall.com/lists/oss-security/2021/12/15/3mailing-list, third-party-advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdfthird-party-advisory, web
https://www.debian.org/security/2021/dsa-5022third-party-advisory, vendor-advisory, web

Sources

SourceRecordLicence
CVE ListCVE-2021-45046 changed 2025-10-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-7rjr-3q55-vv33 changed 2026-10-02CC-BY-4.0
NVDCVE-2021-45046 changed 2026-06-17Public domain
CISA KEVCVE-2021-45046 changed 2023-05-01CC0-1.0