CVE-2021-45046 in apache log4j

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

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 software: apache log4j, cvat computer vision annotation tool, intel audio development kit, intel datacenter manager, intel genomics kernel library, intel oneapi, intel secure device onboard, intel sensor solution firmware development kit, intel system debugger, intel system studio

Scores

What LogPulse has for it

How to mitigate it

Upgrade Apache Log4j 2 to 2.17.1 or later (Log4Shell and follow-up flaws)

Patch or upgrade. Log4j 2.17.1 and later remove message lookups and JNDI by default and restrict the JDBC appender, which closes Log4Shell (CVE-2021-44228), its incomplete fix (CVE-2021-45046), the recursive lookup denial of service (CVE-2021-45105) and the JDBC appender code execution (CVE-2021-44832).

Applies to: Apache Log4j 2.0-beta9 to 2.17.0 (2.12.3 and 2.3.1 on the Java 7 and Java 6 lines).

  1. Find every application and appliance that ships log4j-core 2.x (agent sensors java-log4j-core-*, a software inventory or a log4j scanner).
  2. Upgrade log4j-core to 2.17.1 or later (2.12.4 for Java 7, 2.3.2 for Java 6); this closes Log4Shell and the follow-up flaws CVE-2021-45046, CVE-2021-45105 and CVE-2021-44832.
  3. For vendor products, install the vendor's fixed release.
  4. Where you cannot upgrade, remove JndiLookup.class from the log4j-core jar as a stopgap (this does not fix CVE-2021-45105 or CVE-2021-44832).
  5. Rerun the vulnerability scan and confirm these CVEs are no longer reported.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse