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-36374

CVE-2021-36374: Apache Ant DOS Vulnerability

CVE-2021-36374 is a denial of service flaw in Apache Ant that allows specially crafted ZIP archives to trigger memory exhaustion. This post covers the technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-36374 Overview

CVE-2021-36374 is a Denial of Service vulnerability affecting Apache Ant, a widely-used Java-based build automation tool. When reading a specially crafted ZIP archive, or derived formats such as JAR files and office documents, an Apache Ant build process can be made to allocate large amounts of memory that leads to an out of memory error, even for small inputs. This vulnerability can be exploited to disrupt builds using Apache Ant, potentially causing significant disruption to development and deployment pipelines.

Critical Impact

An attacker can craft malicious ZIP-based files that, when processed by Apache Ant during a build, cause memory exhaustion and crash the build process—disrupting CI/CD pipelines and software delivery workflows.

Affected Products

  • Apache Ant prior to version 1.9.16
  • Apache Ant prior to version 1.10.11
  • Oracle Agile Engineering Data Management 6.2.1.0
  • Oracle Agile PLM 9.3.6
  • Oracle Communications Cloud Native Core Automated Test Suite 1.9.0
  • Oracle Primavera Gateway (multiple versions)
  • Oracle Primavera Unifier 18.8, 19.12, 20.12
  • Oracle Retail XStore Point of Service (multiple versions)
  • Oracle Utilities Framework (multiple versions)
  • Over 30 additional Oracle products incorporating Apache Ant

Discovery Timeline

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

Technical Details for CVE-2021-36374

Vulnerability Analysis

This vulnerability falls under CWE-130 (Improper Handling of Length Parameter Inconsistency). The flaw exists in Apache Ant's ZIP archive handling routines, where the software fails to properly validate or limit memory allocation when processing compressed archive metadata. When Ant processes a ZIP file, it trusts certain length fields embedded in the archive structure to allocate memory buffers. An attacker can craft a malicious archive with inflated size declarations that do not correspond to actual data, causing Ant to attempt to allocate massive amounts of memory.

The attack is particularly concerning because ZIP-based formats are ubiquitous in Java ecosystems. JAR files (Java Archives), WAR files (Web Application Archives), and many office document formats (DOCX, XLSX, etc.) are all based on the ZIP format. This means any build process that handles these common file types through Apache Ant could be vulnerable to this denial of service attack.

Root Cause

The root cause of CVE-2021-36374 is improper handling of length parameter inconsistencies in ZIP archive processing. Apache Ant's archive handling code reads size fields from the ZIP file header and uses these values to allocate memory buffers without adequate validation. When a specially crafted archive contains header values declaring extremely large file sizes that differ dramatically from the actual compressed content, Ant allocates memory based on the declared (malicious) sizes rather than the actual data present.

This design flaw allows for a disproportionate resource consumption attack where a very small input file can trigger the allocation of gigabytes of memory, exhausting available heap space and causing an OutOfMemoryError that crashes the JVM running the Ant build.

Attack Vector

The attack requires local access or the ability to inject a malicious file into a build pipeline. The attacker must craft a ZIP archive (or a ZIP-derived format like JAR) with manipulated header fields that declare large uncompressed sizes. When this malicious file is processed by Apache Ant during tasks such as unzip, unjar, or any task that reads ZIP-based archives, the vulnerable code attempts to allocate memory according to the malicious size declarations.

The attack vector is local (AV:L), requires user interaction (UI:R) in the sense that a build process must be triggered, and requires no special privileges (PR:N). While the attack does not compromise confidentiality or integrity, it achieves high impact on availability (A:H) by causing the build process to crash with an out of memory error.

Exploitation typically occurs when a malicious archive is introduced into a source code repository, build artifact cache, or dependency resolution system. Automated CI/CD pipelines that process these archives without manual review are particularly susceptible.

Detection Methods for CVE-2021-36374

Indicators of Compromise

  • Build process failures with java.lang.OutOfMemoryError exceptions during ZIP/JAR extraction tasks
  • Abnormal memory consumption spikes during Ant build execution
  • Presence of unusually small ZIP or JAR files that claim extremely large uncompressed sizes
  • Build logs showing memory allocation failures during unzip, unjar, or similar archive tasks

Detection Strategies

  • Monitor build server memory utilization and establish baselines for normal build processes
  • Implement file integrity checks on build inputs, particularly for archive files from external sources
  • Scan incoming archives for suspicious header values where declared sizes significantly exceed actual file sizes
  • Deploy SentinelOne Singularity to detect and alert on abnormal process memory consumption patterns

Monitoring Recommendations

  • Configure alerting for JVM OutOfMemoryError conditions in build environments
  • Implement logging for all archive extraction operations with size validation metrics
  • Monitor CI/CD pipeline stability metrics to detect repeated build failures that may indicate exploitation attempts
  • Audit dependency management systems for recently modified or suspicious archive files

How to Mitigate CVE-2021-36374

Immediate Actions Required

  • Upgrade Apache Ant to version 1.9.16 or later for the 1.9.x branch
  • Upgrade Apache Ant to version 1.10.11 or later for the 1.10.x branch
  • Review and update all Oracle products that bundle Apache Ant according to Oracle Critical Patch Updates
  • Audit build pipelines to identify all locations where Apache Ant processes untrusted archive files

Patch Information

Apache has released patched versions that address this vulnerability. Organizations should upgrade to Apache Ant 1.9.16 or 1.10.11 and later. The patches implement proper validation of ZIP archive header fields to prevent memory exhaustion attacks.

For Oracle products affected by this vulnerability, consult the following Oracle Critical Patch Updates:

  • Oracle CPU October 2021 Alert
  • Oracle CPU January 2022 Alert
  • Oracle CPU April 2022 Alert
  • Oracle CPU July 2022 Alert

For additional details, refer to the Apache Ant Security Overview.

Workarounds

  • Implement JVM memory limits using -Xmx to constrain maximum heap allocation and prevent full system memory exhaustion
  • Validate all archive files before processing with independent tools that check for header/content size inconsistencies
  • Isolate build processes in containers with resource limits to contain potential denial of service impacts
  • Restrict build inputs to only trusted sources and implement checksum verification for all archive dependencies
bash
# Configuration example - Limiting JVM heap for Ant builds
export ANT_OPTS="-Xmx1024m -Xms256m"

# Alternative: Configure in ant wrapper script
# This limits the maximum damage from memory exhaustion attacks

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechApache Ant

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.11%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-130

  • NVD-CWE-Other
  • Technical References
  • Apache Commit Thread Discussion

  • Apache Commit Thread Discussion

  • Apache Notification Thread Update

  • Apache MyFaces Thread Update

  • NetApp Security Advisory NTAP-20210819-0007
  • Vendor Resources
  • Apache Security Overview

  • Apache User Thread Discussion

  • Oracle CPU April 2022 Alert

  • Oracle CPU January 2022 Alert

  • Oracle CPU July 2022 Alert

  • Oracle CPU October 2021 Alert
  • Related CVEs
  • CVE-2021-36373: Apache Ant DOS Vulnerability

  • CVE-2020-1945: Apache Ant Information Disclosure Flaw

  • CVE-2020-11979: Apache Ant Temporary File 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