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
    • 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-30640

CVE-2021-30640: Apache Tomcat Auth Bypass Vulnerability

CVE-2021-30640 is an authentication bypass flaw in Apache Tomcat's JNDI Realm that allows attackers to authenticate using username variations or bypass LockOut Realm protections. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: February 25, 2026

CVE-2021-30640 Overview

CVE-2021-30640 is an authentication bypass vulnerability in the JNDI Realm component of Apache Tomcat. This flaw allows an attacker to authenticate using variations of a valid username and/or bypass some of the protection mechanisms provided by the LockOut Realm. The vulnerability stems from improper encoding or escaping of output (CWE-116) within the JNDI Realm authentication process.

Critical Impact

Attackers can potentially bypass authentication controls and account lockout protections, gaining unauthorized access to protected resources on vulnerable Apache Tomcat servers.

Affected Products

  • Apache Tomcat 10.0.0-M1 to 10.0.5
  • Apache Tomcat 9.0.0.M1 to 9.0.45
  • Apache Tomcat 8.5.0 to 8.5.65
  • Oracle Communications Cloud Native Core Policy 1.14.0
  • Oracle Communications Diameter Signaling Router
  • Oracle Communications Pricing Design Center 12.0.0.3.0
  • Oracle Hospitality Cruise Shipboard Property Management System 20.1.0
  • Oracle Tekelec Platform Distribution
  • Debian Linux 9.0, 10.0, 11.0

Discovery Timeline

  • July 12, 2021 - CVE-2021-30640 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-30640

Vulnerability Analysis

The vulnerability exists within the JNDI Realm authentication mechanism of Apache Tomcat. The JNDI Realm is responsible for authenticating users against a directory service such as LDAP. Due to improper output encoding or escaping, attackers can manipulate username inputs to bypass authentication checks.

The flaw allows attackers to authenticate using variations of valid usernames. This occurs because the JNDI Realm does not properly normalize or sanitize username inputs before performing authentication queries against the backend directory service. As a result, character encoding variations or special characters in usernames may be interpreted differently, allowing unauthorized authentication.

Additionally, this vulnerability enables bypassing protections provided by the LockOut Realm. The LockOut Realm is designed to prevent brute-force attacks by locking accounts after a configurable number of failed authentication attempts. However, by using username variations, an attacker can effectively circumvent this protection, as each variation may be treated as a distinct user, resetting the failed attempt counter.

Root Cause

The root cause is classified as CWE-116 (Improper Encoding or Escaping of Output). The JNDI Realm component fails to properly encode or normalize usernames before using them in authentication queries. This allows specially crafted username variations to bypass expected authentication and lockout behaviors.

When usernames are passed to the JNDI directory service, variations in character encoding, case sensitivity handling, or special character interpretation can result in different authentication outcomes than expected. The lack of proper input normalization creates an inconsistency between how the LockOut Realm tracks failed attempts and how the JNDI Realm validates credentials.

Attack Vector

The attack is network-based and does not require prior authentication. An attacker can exploit this vulnerability by:

  1. Identifying a valid username on the target Tomcat application using JNDI Realm authentication
  2. Crafting variations of the username using different character encodings, case variations, or special characters
  3. Attempting authentication with these variations to bypass normal authentication or lockout mechanisms
  4. Gaining unauthorized access to protected resources or avoiding account lockout during brute-force attempts

The vulnerability requires high attack complexity due to the need for specific conditions: the target must use JNDI Realm for authentication, and the attacker needs knowledge of valid usernames and the ability to craft effective variations.

Detection Methods for CVE-2021-30640

Indicators of Compromise

  • Multiple failed authentication attempts from the same source IP with slight variations in usernames
  • Successful authentication events preceded by numerous failed attempts using similar but not identical usernames
  • Unusual patterns in JNDI/LDAP query logs showing username variations or encoding anomalies
  • Authentication bypass events where users authenticate without triggering expected lockout thresholds

Detection Strategies

  • Monitor authentication logs for patterns indicating username manipulation or encoding variations
  • Implement logging at the JNDI Realm level to capture raw authentication requests before normalization
  • Configure Web Application Firewalls (WAF) to detect and alert on suspicious username patterns
  • Deploy SIEM rules to correlate authentication attempts across username variations from the same source

Monitoring Recommendations

  • Enable verbose logging for Apache Tomcat's authentication subsystem, particularly the JNDI Realm component
  • Monitor for an increase in failed authentication attempts that do not trigger LockOut Realm protections
  • Review LDAP directory service logs for unusual query patterns or authentication attempts
  • Implement network-level monitoring to detect authentication brute-force attempts targeting Tomcat applications

How to Mitigate CVE-2021-30640

Immediate Actions Required

  • Upgrade Apache Tomcat to version 10.0.6 or later, 9.0.46 or later, or 8.5.66 or later
  • Review and audit current JNDI Realm configurations for potential exposure
  • Implement additional authentication controls such as multi-factor authentication where possible
  • Consider temporarily disabling JNDI Realm in favor of alternative authentication mechanisms if immediate patching is not possible

Patch Information

Apache has released security patches addressing this vulnerability. Organizations should upgrade to the following versions:

  • Apache Tomcat 10.x: Upgrade to version 10.0.6 or later
  • Apache Tomcat 9.x: Upgrade to version 9.0.46 or later
  • Apache Tomcat 8.5.x: Upgrade to version 8.5.66 or later

For downstream products, refer to vendor-specific advisories:

  • Oracle CPU January 2022 Security Alert
  • Oracle CPU October 2021 Security Alert
  • Debian DSA-4952 Security Notice
  • Debian DSA-4986 Security Notice

Workarounds

  • If using JNDI Realm with LDAP, implement server-side username normalization at the directory service level
  • Configure additional input validation at the application layer to reject malformed or encoded usernames
  • Implement rate limiting at the network or application level to reduce the effectiveness of brute-force attempts
  • Consider using alternative Realm implementations such as DataSourceRealm or MemoryRealm until patching is complete
bash
# Example: Verify Apache Tomcat version to confirm patch status
cd $CATALINA_HOME
./bin/version.sh

# Check for vulnerable versions and plan upgrade accordingly
# Affected: 10.0.0-M1 to 10.0.5, 9.0.0.M1 to 9.0.45, 8.5.0 to 8.5.65
# Patched: 10.0.6+, 9.0.46+, 8.5.66+

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechApache Tomcat

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.12%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Technical References
  • Debian LTS Security Notice

  • Gentoo GLSA 202208-34

  • NetApp Security Advisory NTAP-20210827-0007

  • Debian DSA-4952 Security Notice

  • Debian DSA-4986 Security Notice

  • Oracle CPU July 2021 Security Alert
  • Vendor Resources
  • Apache Tomcat Security Announcement

  • Oracle CPU January 2022 Security Alert

  • Oracle CPU October 2021 Security Alert
  • Related CVEs
  • CVE-2026-34500: Apache Tomcat Auth Bypass Vulnerability

  • CVE-2026-34486: Apache Tomcat Auth Bypass Vulnerability

  • CVE-2026-29145: Apache Tomcat Auth Bypass Vulnerability

  • CVE-2026-24734: Apache Tomcat Auth Bypass 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