Junglewise Threat Intelligence

CVE-2021-45105: Apache Log4j2 uncontrolled recursion in self-referential lookups

CVE-2021-45105 · Severity: high · CVSS 8.6 · Published 2021-12-18

Technologies: Apache Log4j2. Vendors: Apache.

Executive brief

Apache Log4j2, a widely used logging library for Java applications, is vulnerable to a flaw that can cause systems to crash or become unresponsive. By sending specifically crafted data to an application that logs that information, an attacker can trigger an infinite loop that exhausts system resources. This results in a denial-of-service, potentially disrupting business operations and service availability.

Technical details

Apache Log4j2 (specifically the log4j-core component) fails to properly validate input during recursive evaluation of self-referential lookups. An attacker who can provide or influence Thread Context Map data can inject a crafted string that triggers uncontrolled recursion. This leads to a StackOverflowError, terminating the process and resulting in a denial-of-service. The vulnerability is reachable over the network without authentication if the application logs attacker-controlled input using a vulnerable layout pattern. This issue is fixed in versions 2.17.0, 2.12.3, and 2.3.1.

Affected products

  • Apache Log4j2 >= 2.0-alpha1, <= 2.16.0 (excluding 2.12.3)
  • OPS4J pax-logging-log4j2 >= 1.8.0, < 1.9.2; >= 1.10.0, < 1.10.9; >= 1.11.0, < 1.11.12; >= 2.0.0, < 2.0.13

Timeline

  • 2021-12-18: disclosed
  • 2021-12-18: advisory
  • 2021-12-18: patched

References

Related threats