The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-45105

CVE-2021-45105: Apache Log4j DoS Vulnerability

CVE-2021-45105 is a denial of service flaw in Apache Log4j2 caused by uncontrolled recursion from self-referential lookups. This article covers the technical details, affected versions, impact, and mitigation.

Published: March 4, 2026

CVE-2021-45105 Overview

Apache Log4j2 versions 2.0-alpha1 through 2.16.0 (excluding 2.12.3 and 2.3.1) contain a vulnerability that fails to protect against uncontrolled recursion from self-referential lookups. This flaw allows an attacker with control over Thread Context Map (MDC) data to cause a denial of service when a specially crafted string is interpreted by the logging framework. This vulnerability is part of the broader Log4Shell vulnerability series that impacted organizations globally during December 2021.

Critical Impact

Attackers can crash Java applications using vulnerable Log4j2 versions by injecting self-referential lookup strings, causing stack overflow through infinite recursion and resulting in application denial of service.

Affected Products

  • Apache Log4j 2.0-alpha1 through 2.16.0 (excluding 2.12.3 and 2.3.1)
  • Oracle WebLogic Server 12.2.1.3.0, 12.2.1.4.0, and 14.1.1.0.0
  • Oracle Communications products (multiple versions including Diameter Signaling Router, Session Route Manager, and others)
  • Oracle Enterprise Manager Base Platform 13.4.0.0 and 13.5.0.0
  • Oracle PeopleSoft Enterprise PeopleTools 8.58 and 8.59
  • NetApp Cloud Manager
  • Debian Linux 10.0 and 11.0
  • SonicWall Email Security, Network Security Manager, and Web Application Firewall

Discovery Timeline

  • 2021-12-18 - CVE-2021-45105 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-45105

Vulnerability Analysis

This vulnerability stems from improper input validation (CWE-20) in Apache Log4j2's lookup functionality. The logging framework provides powerful string substitution capabilities through lookups, which allow dynamic content to be resolved at runtime. When processing log messages containing lookup patterns like ${ctx:key}, Log4j2 resolves these references by examining the Thread Context Map.

The vulnerability manifests when an attacker can influence the Thread Context Map data with values containing self-referential lookups. When Log4j2 attempts to process such a lookup, it enters an infinite recursion loop as each lookup resolution triggers another lookup resolution, eventually exhausting the stack and causing the application to crash with a StackOverflowError.

While this vulnerability requires high attack complexity due to the need to control Thread Context Map data, it can be exploited over the network without authentication or user interaction, making it a significant concern for internet-facing applications.

Root Cause

The root cause is the lack of recursion depth protection in Log4j2's lookup resolution mechanism. When evaluating string interpolation patterns in log messages, the StrSubstitutor class did not implement safeguards against circular references or self-referential lookup chains. This allows malicious input to create infinite recursion scenarios.

The vulnerability specifically affects how Log4j2 handles context lookups (${ctx:...}), where an attacker can set a context value that references itself or creates a lookup chain that ultimately loops back, triggering unbounded recursion.

Attack Vector

The attack requires an attacker to have some level of control over data that gets placed into the Thread Context Map (also known as MDC - Mapped Diagnostic Context). This is commonly achieved through:

  1. HTTP request headers that applications log (e.g., User-Agent, X-Forwarded-For)
  2. User-supplied input fields that are logged for diagnostic purposes
  3. Query parameters or form data that enters the logging pipeline
  4. Authentication tokens or session identifiers included in log messages

When the application logs a message that triggers the self-referential lookup resolution, the Java process experiences a stack overflow and crashes. The attack can be repeated to maintain a persistent denial of service condition against the target application.

The exploitation pattern involves injecting a payload such as ${${ctx:key}} where the context key key is set to a value that creates infinite recursion. This causes the lookup resolver to repeatedly attempt resolution until the JVM stack is exhausted.

Detection Methods for CVE-2021-45105

Indicators of Compromise

  • Unexpected application crashes with java.lang.StackOverflowError in Log4j2-related stack traces
  • Repetitive application restarts due to JVM crashes in logging components
  • Log entries containing nested lookup patterns like ${ctx:${ctx:...}} or similar recursive structures
  • HTTP requests with suspicious recursive patterns in headers or parameters that are subsequently logged

Detection Strategies

  • Monitor Java applications for frequent StackOverflowError exceptions originating from org.apache.logging.log4j classes
  • Implement web application firewall rules to detect and block requests containing nested ${...} patterns in headers and parameters
  • Scan application dependencies to identify Log4j2 versions between 2.0-alpha1 and 2.16.0 using software composition analysis tools
  • Review application logs for evidence of lookup recursion attempts or malformed context variable references

Monitoring Recommendations

  • Configure JVM monitoring to alert on repeated StackOverflowError exceptions within short time windows
  • Enable detailed access logging to capture HTTP request headers and parameters for forensic analysis
  • Implement application performance monitoring to detect abnormal restart patterns indicating DoS attacks
  • Set up dependency scanning in CI/CD pipelines to flag vulnerable Log4j2 versions before deployment

How to Mitigate CVE-2021-45105

Immediate Actions Required

  • Upgrade Apache Log4j2 to version 2.17.0 or later for Java 8+, version 2.12.3 for Java 7, or version 2.3.1 for Java 6
  • If immediate upgrade is not possible, remove the JndiLookup class from the classpath: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
  • Review all applications in your environment for Log4j2 usage, including transitive dependencies
  • Implement input validation to sanitize user-controlled data before it enters the Thread Context Map

Patch Information

Apache addressed this vulnerability in Log4j 2.17.0 (for Java 8+), 2.12.3 (for Java 7), and 2.3.1 (for Java 6). The fix implements recursion depth limits in the lookup substitution logic to prevent infinite loops. Organizations should consult vendor-specific advisories for downstream products:

  • Apache Log4j Security Documentation
  • Oracle Security Alert CPU January 2022
  • Oracle Security Alert CPU April 2022
  • Debian Security Advisory DSA-5024
  • NetApp Security Advisory NTAP-20211218-0001
  • Cisco Security Advisory - Log4j Issue

Workarounds

  • In Log4j 2.10 or later, set the system property log4j2.formatMsgNoLookups=true to disable message lookup substitution
  • Set the environment variable LOG4J_FORMAT_MSG_NO_LOOKUPS=true as an alternative to the system property
  • Modify the logging configuration to use %m{nolookups} pattern instead of %m in PatternLayout configurations
  • Implement network-level filtering to block requests containing recursive lookup patterns before they reach vulnerable applications
bash
# Configuration example
# Set JVM system property to disable lookups
java -Dlog4j2.formatMsgNoLookups=true -jar your-application.jar

# Or set environment variable
export LOG4J_FORMAT_MSG_NO_LOOKUPS=true

# Remove JndiLookup class from existing jar (mitigation for older versions)
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechApache Log4j

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability65.64%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-20
  • Technical References
  • Siemens Product Security Advisory SSA-479842

  • Siemens Product Security Advisory SSA-501673

  • SonicWall Vulnerability SNWLID-2021-0032

  • NetApp Security Advisory NTAP-20211218-0001

  • Cisco Security Advisory - Log4j Issue

  • Debian Security Advisory DSA-5024

  • CERT Vulnerability ID 930724

  • Oracle Security Alert CPU July 2022

  • Zero Day Initiative Advisory ZDI-21-1541
  • Vendor Resources
  • Openwall OSS Security Discussion

  • Apache Log4j Security Documentation

  • Oracle Security Alert CPU April 2022

  • Oracle Security Alert CPU January 2022
  • Related CVEs
  • CVE-2023-26464: Apache Log4j DOS Vulnerability

  • CVE-2021-44228: Siemens 6bk1602-0aa12-0tp0 RCE Flaw

  • CVE-2025-68161: Apache Log4j Information Disclosure Bug

  • CVE-2021-45046: Apache Log4j RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English