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-2023-42794

CVE-2023-42794: Apache Tomcat DOS Vulnerability

CVE-2023-42794 is a denial of service flaw in Apache Tomcat caused by incomplete cleanup in file upload handling. Unclosed streams can fill disk space on Windows systems. This article covers technical details, affected versions, impact, and mitigation.

Published: February 11, 2026

CVE-2023-42794 Overview

CVE-2023-42794 is an Incomplete Cleanup vulnerability (CWE-459) affecting Apache Tomcat. The internal fork of Commons FileUpload packaged with Apache Tomcat contains an unreleased, in-progress refactoring that exposed a potential denial of service on Windows systems. When a web application opens a stream for an uploaded file but fails to close the stream properly, the file is never deleted from disk. This creates the possibility of an eventual denial of service due to disk space exhaustion.

Critical Impact

Windows-based Apache Tomcat deployments are vulnerable to disk exhaustion attacks when file upload streams are not properly closed, potentially leading to complete denial of service as disk space fills with orphaned temporary files.

Affected Products

  • Apache Tomcat 9.0.70 through 9.0.80
  • Apache Tomcat 8.5.85 through 8.5.93
  • Other End-of-Life (EOL) versions may also be affected

Discovery Timeline

  • 2023-10-10 - CVE CVE-2023-42794 published to NVD
  • 2025-10-29 - Last updated in NVD database

Technical Details for CVE-2023-42794

Vulnerability Analysis

This vulnerability stems from incomplete cleanup operations within Apache Tomcat's internal fork of Commons FileUpload. The issue specifically affects Windows environments due to how the operating system handles file locking. When a web application processes file uploads and opens an input stream to read the uploaded file content, but fails to properly close that stream before the request completes, the temporary file remains locked by the operating system. Unlike POSIX-compliant systems where files can be deleted even when open, Windows prevents deletion of files that have open handles.

The vulnerability was introduced during an unreleased refactoring effort within the Commons FileUpload component bundled with Tomcat. This incomplete code change altered how temporary file cleanup was handled, creating a code path where file deletion could silently fail without proper error handling or retry mechanisms.

Root Cause

The root cause is CWE-459 (Incomplete Cleanup), where the application fails to ensure that temporary uploaded files are properly deleted when streams remain open. The internal refactoring of Commons FileUpload introduced a regression that bypassed the normal cleanup logic under specific conditions. On Windows systems, when an application holds an open stream to an uploaded file, the file system prevents deletion of that file, and the affected Tomcat versions did not properly handle this scenario or queue the file for later cleanup.

Attack Vector

The attack vector is network-based, allowing remote attackers to exploit this vulnerability without authentication. An attacker can repeatedly upload files to a vulnerable Tomcat web application that improperly handles file stream closure. Each failed cleanup leaves an orphaned temporary file on the Windows server's disk. Over time, these accumulated files can exhaust available disk space, leading to a denial of service condition that affects not only the Tomcat application but potentially other services running on the same server.

The attack requires high complexity to execute successfully because it depends on the target web application having a specific bug where uploaded file streams are opened but not closed. However, once such an application is identified, the exploitation itself is straightforward through repeated file uploads.

Detection Methods for CVE-2023-42794

Indicators of Compromise

  • Unusual accumulation of temporary files in Tomcat's work directory or system temp directories
  • Steadily decreasing disk space on Windows servers running Tomcat without corresponding application activity
  • Application logs showing file deletion failures or IOException related to file operations
  • Presence of orphaned .tmp files in upload directories that persist beyond request lifecycles

Detection Strategies

  • Monitor disk space utilization trends on Windows servers hosting Apache Tomcat instances
  • Implement file system auditing to track temporary file creation and deletion patterns
  • Review application logs for stream closure exceptions or file handle leaks
  • Use application performance monitoring tools to detect unclosed resource handles

Monitoring Recommendations

  • Configure alerts for disk space thresholds on affected servers (recommend warning at 80%, critical at 90%)
  • Implement periodic cleanup scripts to identify and remove orphaned temporary files older than expected request durations
  • Monitor the count of open file handles for Tomcat processes to detect potential stream leaks
  • Review application code for proper try-with-resources patterns or explicit stream closure in file upload handlers

How to Mitigate CVE-2023-42794

Immediate Actions Required

  • Upgrade Apache Tomcat 9.x installations to version 9.0.81 or later
  • Upgrade Apache Tomcat 8.5.x installations to version 8.5.94 or later
  • Review web applications for proper file upload stream handling and ensure all streams are closed
  • Monitor disk space on Windows servers running vulnerable Tomcat versions until patching is complete

Patch Information

Users are recommended to upgrade to Apache Tomcat version 9.0.81 or later for the 9.x branch, or version 8.5.94 or later for the 8.5.x branch. These versions include fixes for the incomplete cleanup issue in the internal Commons FileUpload fork. The patch ensures proper cleanup of temporary files even when application code fails to close upload streams. For detailed information, refer to the Apache Mailing List Discussion.

Workarounds

  • Audit and fix all web application code to ensure proper closure of file upload input streams using try-with-resources or explicit finally blocks
  • Implement scheduled tasks to clean up orphaned temporary files in Tomcat work directories
  • Consider deploying on Linux/Unix systems where file deletion is not blocked by open handles
  • Implement disk quota monitoring and alerts to detect potential abuse before complete exhaustion
bash
# Configuration example
# Scheduled cleanup script for Windows Tomcat servers
# Run this as a scheduled task to remove orphaned temp files older than 24 hours

# PowerShell script to clean orphaned temporary files
# Get-ChildItem -Path "C:\path\to\tomcat\work" -Recurse -File | 
#   Where-Object { $_.LastWriteTime -lt (Get-Date).AddHours(-24) } | 
#   Remove-Item -Force -ErrorAction SilentlyContinue

# Monitor disk space and alert if below threshold
# $disk = Get-WmiObject Win32_LogicalDisk -Filter "DeviceID='C:'"
# $freePercent = ($disk.FreeSpace / $disk.Size) * 100
# if ($freePercent -lt 20) { Write-Warning "Disk space critically low" }

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechApache Tomcat

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.32%

  • 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-459
  • Technical References
  • OpenWall OSS Security Update
  • Vendor Resources
  • Apache Mailing List Discussion
  • Related CVEs
  • CVE-2025-53506: Apache Tomcat HTTP/2 DoS Vulnerability

  • CVE-2025-52520: Apache Tomcat Integer Overflow DoS Flaw

  • CVE-2025-48989: Apache Tomcat DOS Vulnerability

  • CVE-2024-38286: Apache Tomcat DOS 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