Skip to content
OpenAdvisories
Critical · 9.0 Known exploited · Ransomware Scanner template Public exploit CVE-2021-45046 EUVD-2021-34769GHSA-7rjr-3q55-vv33

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

Published Dec 14, 2021 · Updated Oct 21, 2025 · Assigned by apache

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 products

VendorProductAffectedFixed
Apache Software Foundation Apache Log4j Apache Log4j2 – < 2.16.0 2.16.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 apache-log4j2 2.16.0-1 —
Debian 13 apache-log4j2 2.16.0-1 —
Debian 12 apache-log4j2 2.16.0-1 —
Debian 11 apache-log4j2 2.16.0-1~deb11u1 DSA-5022-1
Debian 10 apache-log4j2 2.16.0-1~deb10u1 DSA-5022-1
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS apache-log4j2 2.16.0-0.20.04.1 USN-5197-1
ReleasePackageFixed inAdvisory
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-apache-cxf +3 3.1.16-4.redhat_00003.1.ep7.el7 RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-hal-console 3.2.17-1.Final_redhat_00001.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jackson-core +7 2.10.4-2.redhat_00004.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jackson-databind 2.8.11.6-2.SP1_redhat_00002.1.ep7.el7 RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jackson-modules-base +1 2.10.4-4.redhat_00004.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jettison 1.3.8-2.redhat_00002.1.ep7.el7 RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-netty +1 4.1.63-1.Final_redhat_00002.1.ep7.el7 RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-resteasy +16 3.0.27-1.Final_redhat_00001.1.ep7.el7 RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-resteasy-rxjava2 +2 3.11.6-1.Final_redhat_00001.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-snakeyaml 1.33.0-1.SP1_redhat_00001.1.el7eap RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-velocity 1.7.0-3.redhat_00006.1.ep7.el7 RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-wildfly +1 7.1.9-2.GA_redhat_00002.1.ep7.el7 RHSA-2025:1747, RHSA-2025:1746
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-wildfly-javadocs +2 7.3.12-3.GA_redhat_00002.1.el7eap RHSA-2025:1747
Red Hat JBoss EAP 7 eap7-log4j 2.17.1-1.redhat_00001.1.el7eap RHSA-2022:1297, RHSA-2022:1296
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed log4j 2.16.0-2.1 openSUSE-SU-2024:11681-1
openSUSE Leap 15.3 disruptor 3.4.4-3.3.1 openSUSE-SU-2021:4107-1
openSUSE Leap 15.3 jakarta-servlet 5.0.0-5.3.1 openSUSE-SU-2021:4107-1
openSUSE Leap 15.3 log4j 2.13.0-4.6.1 openSUSE-SU-2021:4107-1, openSUSE-SU-2021:4094-1
openSUSE Leap 15.2 disruptor 3.4.4-lp152.2.3.1 openSUSE-SU-2021:1601-1
openSUSE Leap 15.2 jakarta-servlet 5.0.0-lp152.2.1 openSUSE-SU-2021:1601-1
openSUSE Leap 15.2 log4j 2.16.0-lp152.3.9.1 openSUSE-SU-2021:1601-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 aws-kinesis-agent 2.0.4-1.amzn2 ALAS2-2021-1730
Amazon Linux 2 java-1.7.0-openjdk +6 1:1.7.0.261-2.6.22.2.amzn2.0.2 ALAS2-2021-1731
Amazon Linux 2 java-1.8.0-openjdk +15 1:1.8.0.312.b07-1.amzn2.0.2 ALAS2-2021-1731
Amazon Linux 2 java-11-amazon-corretto +2 1:11.0.13+8-2.amzn2 ALAS2-2021-1731
Amazon Linux 2 java-17-amazon-corretto +4 1:17.0.1+12-3.amzn2.1 ALAS2-2021-1731

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

GitHub 11 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.apache.logging.log4j:log4j-core >= 2.13.0, < 2.16.0 2.16.0 GHSA-7rjr-3q55-vv33
Maven org.apache.logging.log4j:log4j-core >= 2.4.0, < 2.12.2 2.12.2 GHSA-7rjr-3q55-vv33
Maven org.apache.logging.log4j:log4j-core < 2.3.1 2.3.1 GHSA-7rjr-3q55-vv33
Maven org.ops4j.pax.logging:pax-logging-log4j2 >= 1.8.0, < 1.9.2 1.9.2 GHSA-7rjr-3q55-vv33
Maven org.ops4j.pax.logging:pax-logging-log4j2 >= 1.10.0, < 1.10.8 1.10.8 GHSA-7rjr-3q55-vv33
Maven org.ops4j.pax.logging:pax-logging-log4j2 >= 1.11.0, < 1.11.11 1.11.11 GHSA-7rjr-3q55-vv33
Maven org.ops4j.pax.logging:pax-logging-log4j2 >= 2.0.0, < 2.0.12 2.0.12 GHSA-7rjr-3q55-vv33

Advisories 21

References