Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-24122

CVE-2021-24122: Apache Tomcat Information Disclosure Flaw

CVE-2021-24122 is an information disclosure vulnerability in Apache Tomcat that exposes JSP source code on NTFS systems. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 25, 2026

CVE-2021-24122 Overview

CVE-2021-24122 is a source code disclosure vulnerability affecting Apache Tomcat when serving resources from a network location using the NTFS file system. The vulnerability allows attackers to potentially view JSP source code in certain configurations, exposing sensitive application logic, credentials, and other confidential information that should never be accessible to end users.

Critical Impact

JSP source code disclosure can expose sensitive business logic, hardcoded credentials, database connection strings, and internal application architecture to attackers, enabling further targeted attacks.

Affected Products

  • Apache Tomcat 10.0.0-M1 to 10.0.0-M9
  • Apache Tomcat 9.0.0.M1 to 9.0.39
  • Apache Tomcat 8.5.0 to 8.5.59
  • Apache Tomcat 7.0.0 to 7.0.106
  • Debian Linux 9.0
  • Oracle Agile PLM 9.3.3 and 9.3.6

Discovery Timeline

  • January 14, 2021 - CVE-2021-24122 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-24122

Vulnerability Analysis

This vulnerability stems from inconsistent behavior between the Java Runtime Environment (JRE) API and the underlying Windows API when handling file paths on NTFS network shares. When Apache Tomcat serves resources from a network location using NTFS, the File.getCanonicalPath() method may return unexpected results due to the Windows FindFirstFileW API's inconsistent handling of certain path patterns.

Under specific configurations, this behavior allows attackers to craft requests that bypass Tomcat's normal resource handling, resulting in the disclosure of raw JSP source code instead of the compiled and executed output. This type of information exposure (CWE-200) combined with the use of an incorrectly-resolved name or reference (CWE-706) creates a significant security gap.

The vulnerability specifically affects deployments where Tomcat serves content from network-mounted NTFS file systems, a common configuration in enterprise environments using Windows file servers for centralized web content management.

Root Cause

The root cause is a combination of two factors:

  1. Windows API Inconsistency: The FindFirstFileW Windows API exhibits unexpected behavior when resolving certain file path patterns on NTFS file systems, particularly on network shares.

  2. JRE API Behavior: The File.getCanonicalPath() method in the JRE relies on the underlying OS file system APIs for path canonicalization. When the Windows API returns inconsistent results, this propagates through to Java applications.

This mismatch allows specially crafted HTTP requests to be interpreted differently than intended, causing Tomcat to return the raw JSP source file rather than processing it through the JSP compiler.

Attack Vector

The attack requires network access to the vulnerable Tomcat server. An attacker can craft HTTP requests with manipulated file paths targeting JSP files. When the server processes these requests on an NTFS network share, the path canonicalization inconsistency may cause Tomcat to serve the raw source code instead of executing the JSP.

The attack complexity is high because it requires a specific deployment configuration (NTFS network shares) and careful path manipulation. No authentication is required, and the impact is limited to confidentiality—attackers can read source code but cannot directly modify files or cause service disruption through this vulnerability alone.

Detection Methods for CVE-2021-24122

Indicators of Compromise

  • Unusual HTTP request patterns containing path manipulation characters targeting .jsp files
  • Web server logs showing successful responses with Content-Type: text/plain for JSP resources
  • Requests containing encoded path separators or alternate data stream references
  • Anomalous access patterns to JSP files from external IP addresses

Detection Strategies

  • Monitor HTTP access logs for requests to JSP files with unusual path patterns or encoded characters
  • Implement web application firewall (WAF) rules to detect and block path traversal and manipulation attempts
  • Configure intrusion detection systems to alert on responses containing JSP syntax patterns (e.g., <%, %>, scriptlet tags)
  • Review server configurations to identify Tomcat instances serving content from network NTFS shares

Monitoring Recommendations

  • Enable detailed access logging on Apache Tomcat to capture full request URIs and response codes
  • Set up alerting for responses to JSP files that return plain text content types
  • Monitor for reconnaissance activity targeting web application structure and file extensions
  • Conduct regular security audits of Tomcat deployment configurations

How to Mitigate CVE-2021-24122

Immediate Actions Required

  • Upgrade Apache Tomcat to version 10.0.0-M10+, 9.0.40+, 8.5.60+, or 7.0.107+ immediately
  • Review and audit any Tomcat deployments serving content from network NTFS shares
  • Implement network segmentation to restrict access to internal Tomcat instances
  • Enable web application firewall rules to filter suspicious path patterns

Patch Information

Apache has released patched versions that address the path canonicalization issue. Organizations should upgrade to the following minimum versions:

  • Tomcat 10.x: Upgrade to 10.0.0-M10 or later
  • Tomcat 9.x: Upgrade to 9.0.40 or later
  • Tomcat 8.5.x: Upgrade to 8.5.60 or later
  • Tomcat 7.x: Upgrade to 7.0.107 or later

For additional vendor-specific patches, refer to the Apache Tomcat Security Announcement, Debian LTS Security Advisory, and Oracle July 2021 Security Alert.

Workarounds

  • Avoid serving Tomcat web applications directly from NTFS network shares; use local file systems instead
  • If network shares are required, consider using non-NTFS file systems such as SMB shares on Linux servers
  • Implement strict request filtering at the reverse proxy or load balancer level to sanitize incoming paths
  • Configure security constraints in web.xml to restrict direct access to JSP files where possible
bash
# Example: Verify Tomcat version and check for vulnerable configuration
# Check current Tomcat version
catalina.sh version

# Review server.xml for docBase attributes pointing to network shares
grep -i "docBase" $CATALINA_HOME/conf/server.xml

# Example: Upgrade Tomcat on Linux
# Stop Tomcat service
systemctl stop tomcat

# Download and install patched version (example for 9.0.40+)
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.40/bin/apache-tomcat-9.0.40.tar.gz

# Verify checksum and extract
tar -xzf apache-tomcat-9.0.40.tar.gz

# Restart Tomcat
systemctl start tomcat

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechApache Tomcat

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability53.94%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200

  • CWE-706
  • Technical References
  • OpenWall OSS Security List

  • Apache Announcement Thread

  • Apache TomEE Dev Thread

  • Apache TomEE Dev Thread

  • Apache Tomcat Dev Thread

  • Apache Tomcat Users Thread

  • Apache Tomcat Dev Thread

  • Debian LTS Announcement

  • NetApp Security Advisory

  • Oracle July 2021 Security Alert
  • Vendor Resources
  • Apache Tomcat Announcement Thread
  • Related CVEs
  • CVE-2026-34487: Apache Tomcat Information Disclosure Flaw

  • CVE-2026-29146: Apache Tomcat Padding Oracle Vulnerability

  • CVE-2023-28708: Apache Tomcat Info Disclosure Vulnerability

  • CVE-2024-21733: Apache Tomcat Information Disclosure Flaw
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