CVE-2021-45046Apache Log4j2 Thread Context Message Pattern and Context Lookup Pattern vulnerable to a…
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.
What to do
This CVE is being exploited in the wild (CISA Known Exploited Vulnerabilities, added 2023-05-01). If you run an affected version, patch or mitigate now.
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 22.04 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | apache-log4j2 | Fixed | 2.16.0-0.20.04.1 | UBUNTU-CVE-2021-45046 |
| Ubuntu 18.04 | apache-log4j2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | apache-log4j2 | Fix pending | ||
| Debian 14 | apache-log4j2 | Fixed | 2.16.0-1 | DEBIAN-CVE-2021-45046 |
| Debian 13 | apache-log4j2 | Fixed | 2.16.0-1 | DEBIAN-CVE-2021-45046 |
| Debian 12 | apache-log4j2 | Fixed | 2.16.0-1 | DEBIAN-CVE-2021-45046 |
| 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.12.2 | GHSA-7rjr-3q55-vv33 |
| Maven library | org.ops4j.pax.logging:pax-logging-log4j2 | Fixed | 2.0.12 | GHSA-7rjr-3q55-vv33 |
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 Log4j: affected: Apache Log4j2 to before 2.16.0; fixed in
2.16.0
Vendor advisories:
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log… (vendor-advisory)
- https://www.debian.org/security/2021/dsa-5022 (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- 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://logging.apache.org/log4j/2.x/security.html
- 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
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd
- http://www.openwall.com/lists/oss-security/2021/12/15/3
- https://cert-portal.siemens.com/productcert/pdf/ssa-714170.pdf
- https://www.debian.org/security/2021/dsa-5022
- 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
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.