Apache Struts 2 DoS Vulnerability

Critical Apache Struts 2 DoS Vulnerability: File Leak Threatens Disk Exhaustion

CVE-2025-64775 & CVE-2025-66675: Understanding and Mitigating the Multipart Request Processing Flaw

The Apache Software Foundation has disclosed two related critical Denial of Service vulnerabilities affecting nearly all versions of the Apache Struts framework. These flaws allow unauthenticated attackers to exhaust server disk space through specially crafted file upload requests, potentially causing complete system unavailability. Organizations running Apache Struts must take immediate action to assess their exposure and implement remediation measures.

Apache Struts 2, one of the most widely deployed Java web application frameworks, has been found vulnerable to a sophisticated Denial of Service attack that exploits improper handling of multipart request processing. The vulnerabilities, tracked as CVE-2025-64775 and CVE-2025-66675, stem from a file leak in the framework’s file upload mechanism that prevents temporary files from being properly deleted after processing.

When attackers send specially crafted multipart requests containing file uploads or large form data, the Apache Struts framework creates temporary files on the server’s disk storage. Due to an incomplete cleanup process in the JakartaMultiPartRequest class, these temporary files are not properly removed, accumulating over time until the server’s disk space is completely exhausted. Once disk space is depleted, affected systems cannot write new data, generate logs, or function properly, resulting in a complete denial of service.

The widespread impact of these vulnerabilities cannot be overstated. With affected versions spanning from Apache Struts 2.0.0 through 6.7.4 and 7.0.0 through 7.0.3, virtually every organization using this popular framework is potentially at risk. Legacy deployments running unsupported versions such as 2.3.x and 2.5.x face particularly acute danger, as these versions no longer receive security patches and represent the most vulnerable segment of the user base.

Understanding CVE-2025-64775 and CVE-2025-66675

These two CVE identifiers represent closely related aspects of the same underlying vulnerability in Apache Struts’ multipart request processing mechanism. CVE-2025-64775 was initially disclosed on December 1, 2025, with CVE-2025-66675 following on December 10, 2025, to address missing affected version information (specifically version 6.7.4).

Vulnerability AttributeCVE-2025-64775CVE-2025-66675
Publication DateDecember 1, 2025December 10, 2025
CVSS Base Score7.5 (High)8.2 (High)
CVSS VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Attack VectorNetwork (Remote)Network (Remote)
Attack ComplexityLowLow
Privileges RequiredNoneNone
User InteractionNoneNone
Confidentiality ImpactNoneLow
Integrity ImpactNoneNone
Availability ImpactHighHigh
Affected Versions2.0.0-6.7.0, 7.0.0-7.0.32.0.0-6.7.4, 7.0.0-7.0.3
RelationshipInitial disclosureCorrects affected version information

Why Two CVE Numbers?

CVE-2025-66675 was issued to correct incomplete version information in the original CVE-2025-64775 advisory. Specifically, version 6.7.4 was initially missed in the affected version range. Both CVEs describe the same fundamental vulnerability and require the same remediation actions. Organizations should treat these as a single security issue requiring unified response.

The Root Cause: JakartaMultiPartRequest File Leak

The vulnerability originates in the org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest class, specifically within its cleanUp() method. This method is responsible for deleting temporary files created during multipart request processing. However, the implementation contained a critical oversight.

ComponentFunctionVulnerabilityImpact
JakartaMultiPartRequestHandles multipart/form-data requestsIncomplete file cleanup in cleanUp() methodTemporary files accumulate on disk
Apache Commons FileUploadUnderlying library for file upload processingCreates temporary files for form fields exceeding size thresholdMultiple temporary files per request
cleanUp() MethodDeletes temporary files after processingOnly deleted files from explicit file uploads, not form fieldsRegular form field temporary files never deleted
processUpload() MethodParses multipart request dataTriggers temporary file creation without cleanup guaranteeMemory-to-disk spill creates orphaned files
Temporary File SystemStores temporary upload filesNo automated cleanup mechanism for leaked filesGradual disk exhaustion over time

The Apache Commons FileUpload library, which underlies Struts’ multipart processing, creates temporary files not only for explicit file uploads but also for regular form fields when they exceed a configurable size threshold. The flawed cleanUp() method only deleted temporary files associated with actual file uploads, completely neglecting temporary files created for oversized form field data.

// Simplified vulnerable code pattern public void cleanUp() { // Only cleans up file upload temporary files for (FileItem item : fileItems) { if (item.isFormField()) { // BUG: Skips cleanup for form field temporary files continue; } item.delete(); // Only deletes file upload temps } } // Each request potentially leaves behind orphaned temporary files // Repeated requests cause accumulation until disk exhaustion

Attack Mechanics and Exploitation Scenario

Exploiting this vulnerability requires minimal sophistication. An attacker simply needs to send HTTP POST requests with multipart/form-data encoding containing large form field values. The attack sequence unfolds as follows:

Attack PhaseAttacker ActionSystem BehaviorCumulative Impact
1. ReconnaissanceIdentify Struts application with file upload or form processingNormal application operationAttack preparation
2. Initial ProbingSend test multipart request with large form fieldsTemporary files created and not deletedFirst leaked files appear
3. Volume AmplificationAutomate requests with varying field sizes and countsRapid accumulation of temporary filesDisk space begins depleting
4. Resource SaturationMaintain sustained request rateFile system fills, write operations start failingApplication performance degradation
5. Denial of ServiceContinue until complete disk exhaustionNo disk space for logs, sessions, or dataComplete system unavailability
6. PersistenceFiles remain even after attack stopsSystem cannot recover without manual cleanupProlonged outage requiring intervention

Low Exploitation Barrier

This vulnerability requires no authentication, no special privileges, and no user interaction. Attackers can exploit it remotely using standard HTTP tools like curl, Python scripts, or purpose-built exploitation frameworks. The attack leaves minimal forensic evidence beyond disk space depletion and failed write operations, making attribution and detection challenging without proper monitoring infrastructure.

Impact Assessment and Risk Analysis

Organizational Impact Scenarios

The consequences of successful exploitation extend far beyond simple service disruption. Organizations face multifaceted impacts across operational, financial, and reputational dimensions.

Impact CategoryImmediate EffectsSecondary ConsequencesLong-term Implications
Service AvailabilityComplete application downtime, inability to process transactionsCustomer service degradation, transaction failuresUser migration to competitors, market share loss
Data IntegrityFailed database writes, corrupted transaction logsData inconsistency, backup failuresRegulatory compliance violations, audit findings
Operational ContinuityUnable to log security events, monitor systemsBlind spots in security monitoring, delayed incident detectionCompromised security posture, vulnerability to cascading attacks
Financial PerformanceLost revenue during outage, emergency response costsSLA breach penalties, customer refundsIncreased insurance premiums, investor confidence erosion
ReputationNegative publicity, customer complaintsSocial media backlash, press coverageBrand damage, customer trust erosion, competitive disadvantage
Recovery EffortManual file cleanup, disk space recoverySystem restoration, security validationProcess improvements, architectural changes

Industry-Specific Risk Factors

Different sectors face varying levels of exposure and impact severity based on their reliance on Apache Struts and tolerance for service disruption.

Industry SectorApache Struts UsageRisk LevelKey Concerns
Financial ServicesWidespread in legacy banking and payment systemsCriticalTransaction processing failures, regulatory reporting disruption, customer account access issues
E-commerceCommon in order management and inventory systemsHighLost sales during peak periods, shopping cart abandonment, payment processing failures
HealthcarePatient portals, electronic health record systemsCriticalPatient care disruption, medical record unavailability, appointment scheduling failures
GovernmentCitizen service portals, tax filing systemsHighPublic service disruption, citizen data access issues, deadline compliance problems
EducationLearning management systems, student portalsModerateCourse access disruption, grade reporting failures, enrollment processing delays
TelecommunicationsCustomer management, billing systemsHighService provisioning delays, billing failures, customer support disruption
ManufacturingSupply chain management, quality trackingModerateProduction scheduling disruption, inventory management failures, supplier coordination issues

Detection and Identification Strategies

Vulnerability Assessment Methodology

Organizations must rapidly identify whether their infrastructure contains vulnerable Apache Struts installations and assess the exposure level of affected systems.

Assessment PhaseActions RequiredTools and TechniquesExpected Deliverables
Inventory DiscoveryIdentify all Java web applications in environmentCMDB queries, network scanning, application catalogsComplete list of Java-based web applications
Version DetectionDetermine Apache Struts version for each applicationJAR file analysis, dependency management tools, runtime inspectionVulnerable vs. non-vulnerable application classification
Exposure AnalysisAssess network accessibility and attack surfaceNetwork topology review, firewall rule analysis, endpoint enumerationRisk-prioritized remediation list
Functionality ReviewIdentify applications with file upload or form processingCode review, functionality testing, user documentationConfirmed exploitable instances
Criticality AssessmentEvaluate business impact of each vulnerable systemBusiness impact analysis, dependency mapping, SLA reviewPrioritized remediation roadmap
Compliance VerificationCheck for regulatory or contractual security requirementsCompliance frameworks, audit reports, contract reviewCompliance-driven remediation timeline
# Example version detection commands # Check JAR file for Struts version jar -tf application.war | grep struts2-core unzip -l application.war | grep struts2-core # Maven dependency check mvn dependency:tree | grep struts # Search filesystem for Struts JARs find / -name "struts2-core*.jar" 2>/dev/null # Check running Java processes for Struts ps aux | grep java jps -v | grep struts # Scan web application structure ls -la WEB-INF/lib/ | grep struts

Runtime Monitoring and Anomaly Detection

Even before implementing patches, organizations should deploy monitoring capabilities to detect exploitation attempts and ongoing attacks.

Monitoring FocusKey IndicatorsDetection MethodsResponse Actions
Disk Space UtilizationRapid disk usage increase, unusual growth patternsDisk monitoring tools, SNMP alerts, system logsAutomated alerts, capacity investigation, temporary file cleanup
Temporary File CountAbnormal temporary file accumulation in /tmp or upload directoriesFile system monitoring, inode usage tracking, directory size alertsIdentify file creation patterns, block suspicious IPs
Multipart Request PatternsHigh volume of POST requests with multipart encodingWeb access logs, WAF analytics, request rate monitoringRate limiting, source IP blocking, request throttling
Application Error RatesIncreased disk write failures, I/O errors, application exceptionsApplication logs, error tracking systems, APM toolsEmergency disk cleanup, service restart procedures
System PerformanceDegraded I/O performance, slow response timesPerformance monitoring, user experience trackingPerformance investigation, resource allocation review
Log Generation FailuresMissing log entries, log rotation failuresLog aggregation gaps, syslog monitoringEmergency storage allocation, log compression

Remediation and Mitigation Strategies

Immediate Patching Requirements

The Apache Software Foundation has released patched versions that completely resolve the file leak vulnerability. Organizations must prioritize upgrading to these secure versions as the primary remediation strategy.

Current Version RangeVulnerability StatusRecommended ActionTarget Version
2.0.0 – 6.7.4VulnerableImmediate upgrade required6.8.0 or later
7.0.0 – 7.0.3VulnerableImmediate upgrade required7.1.1 or later
6.8.0+PatchedMaintain current version, apply regular updatesN/A
7.1.1+PatchedMaintain current version, apply regular updatesN/A
2.3.x (Legacy)Vulnerable, unsupportedEmergency migration to supported version6.8.0 or 7.1.1
2.5.x (Legacy)Vulnerable, unsupportedEmergency migration to supported version6.8.0 or 7.1.1

Legacy Version Warning

Organizations running legacy Struts versions (2.3.x, 2.5.x) face the highest risk. These versions no longer receive security patches and likely contain numerous additional vulnerabilities beyond CVE-2025-64775 and CVE-2025-66675. Immediate migration to supported versions is not just recommended but critical for organizational security. Legacy versions represent a fundamental security liability that exposes organizations to current and future exploitation.

Phased Remediation Implementation

Organizations unable to implement immediate patching must adopt a phased approach combining short-term mitigations with long-term remediation planning.

PhaseTimelineActionsSuccess Criteria
Emergency Response (0-24 hours)ImmediateDeploy WAF rules, implement rate limiting, activate monitoring alerts, establish incident response proceduresAttack detection capability, temporary protection in place
Critical System Patching (1-7 days)PriorityUpgrade internet-facing and business-critical applications to patched versions, test functionality, validate securityHighest-risk systems secured, core business operations protected
Standard System Remediation (1-4 weeks)ScheduledUpgrade remaining vulnerable applications, coordinate with change management, minimize business disruptionAll production systems patched, vulnerability eliminated
Development/Test Environment Updates (1-8 weeks)PlannedUpdate non-production environments, align with development cycles, update CI/CD pipelinesComplete environment consistency, no reintroduction risk
Legacy System Migration (2-6 months)StrategicPlan and execute migration from unsupported Struts versions, application modernization, architectural improvementsElimination of technical debt, supported framework versions
Continuous Validation (Ongoing)PerpetualRegular vulnerability scanning, version compliance monitoring, security testing, update managementMaintained security posture, rapid new vulnerability response

Compensating Controls for Delayed Patching

When immediate patching is not feasible due to operational constraints, organizations must implement compensating security controls to reduce exploitation risk.

Control TypeImplementationEffectivenessLimitations
Web Application Firewall RulesBlock or rate-limit large multipart requests, unusual upload patternsModerate – Can detect obvious attack patternsDetermined attackers can evade with careful request crafting
Request Rate LimitingThrottle POST requests per IP, session, or userModerate – Slows attack progressionDoes not prevent attack, only delays exhaustion
Disk Quota ManagementImplement per-process or per-user disk quotas for temp directoriesLow – May limit impact scopeCan cause legitimate functionality issues, doesn’t prevent attack
Network SegmentationRestrict network access to vulnerable applicationsHigh – Reduces attacker surfaceMay impact business functionality, doesn’t fix vulnerability
Temporary File Cleanup ScriptsScheduled automated cleanup of old temporary filesLow – Treats symptom, not causeRapid attacks can overwhelm cleanup, potential data loss
Enhanced Monitoring and AlertingReal-time disk usage monitoring, attack pattern detectionHigh – Enables rapid responseReactive rather than preventive, requires skilled response team
Geographic IP BlockingBlock connections from high-risk countries or IP rangesLow – Reduces some threat vectorsEasily bypassed with VPNs, may block legitimate users

Compensating Controls Are Temporary

While compensating controls provide valuable risk reduction during the remediation window, they should never be considered permanent solutions. These measures reduce but do not eliminate vulnerability. Organizations must maintain pressure on patching initiatives and avoid the dangerous trap of considering compensating controls as sufficient long-term protection. The only complete solution is upgrading to patched Apache Struts versions.

Incident Response and Recovery Procedures

Attack Detection and Confirmation

Organizations suspecting active exploitation must rapidly validate whether an attack is occurring and assess its current impact.

# Emergency disk space assessment df -h du -sh /tmp /var/tmp /upload-directory find /tmp -type f -mtime -1 | wc -l # Identify potential leaked temporary files find /tmp -name "upload_*" -o -name "struts*" -o -name "*.tmp" ls -lah /tmp | grep $(date +%Y-%m-%d) # Check for unusual multipart requests in logs grep -i "multipart" /var/log/apache2/access.log | tail -100 grep -i "Content-Type: multipart" /var/log/httpd/access_log # Monitor real-time disk usage watch -n 5 'df -h | grep -E "Filesystem|/tmp|/var"' # Identify top disk consumers du -sh /tmp/* | sort -hr | head -20 lsof +L1 | grep deleted

Emergency Response Actions

Response ActionPurposeImplementation StepsConsiderations
Isolate Affected SystemsPrevent continued exploitation and lateral movementBlock inbound traffic at firewall, disable application access, preserve forensic evidenceMay cause business disruption, requires executive authorization
Clear Temporary FilesRestore disk space and operational capabilityIdentify and remove leaked files, preserve samples for analysis, monitor for recurrenceRisk of deleting legitimate files, may require service restart
Implement Emergency WAF RulesBlock ongoing attack trafficDeploy restrictive rules for multipart requests, enable aggressive rate limiting, log all blocked attemptsMay impact legitimate users, requires testing
Capture Forensic EvidenceSupport investigation and potential legal actionPreserve access logs, sample temporary files, document disk usage timeline, capture network trafficStorage requirements, chain of custody maintenance
Notify StakeholdersEnsure appropriate awareness and coordinationAlert security team, inform business leaders, prepare customer communicationsInformation sensitivity, regulatory disclosure requirements
Emergency PatchingPermanently resolve vulnerabilityDeploy patches outside normal change windows, validate functionality, document emergency changeTesting limitations, risk of introducing new issues

Long-Term Security Enhancement

Process and Architectural Improvements

Organizations should leverage this incident as a catalyst for broader security program enhancements that prevent future similar vulnerabilities.

Improvement AreaCurrent GapRecommended EnhancementExpected Benefit
Vulnerability ManagementReactive patching, delayed response to critical issuesEstablish formal patch management program with defined SLAs, automated vulnerability scanningFaster vulnerability identification and remediation
Dependency TrackingUnclear inventory of framework versions and dependenciesImplement software composition analysis tools, maintain automated dependency inventoryRapid impact assessment for new vulnerabilities
Security TestingLimited pre-deployment security validationIntegrate SAST/DAST into CI/CD pipelines, regular penetration testingEarlier vulnerability detection, reduced production risk
Framework GovernanceUncontrolled framework adoption, version sprawlEstablish approved framework list, version standardization policyReduced attack surface, simplified patching
Legacy System ManagementUnsupported versions in production, unclear migration plansDefine end-of-life policies, mandatory modernization roadmapsElimination of unsupportable security liabilities
Monitoring CoverageLimited visibility into application security eventsDeploy comprehensive application security monitoring, SIEM integrationFaster attack detection and response

Building Resilient Security Practices

The Apache Struts vulnerabilities highlight the critical importance of proactive security management. Organizations that maintain current software versions, implement comprehensive monitoring, and respond rapidly to emerging threats significantly reduce their exposure to exploitation. By investing in robust vulnerability management processes, automated security testing, and continuous monitoring, organizations can transform from reactive to proactive security postures, substantially reducing risk across their entire application portfolio.

Conclusion and Key Takeaways

CVE-2025-64775 and CVE-2025-66675 represent serious Denial of Service vulnerabilities affecting one of the most widely deployed Java web application frameworks. The file leak in Apache Struts’ multipart request processing enables unauthenticated attackers to exhaust server disk space through relatively simple exploitation techniques, potentially causing complete system unavailability.

Organizations must treat these vulnerabilities with utmost seriousness and implement remediation measures immediately. The widespread nature of Apache Struts deployment, combined with the low exploitation complexity and high impact of successful attacks, creates a critical risk scenario that demands urgent action.

Successful vulnerability management extends beyond simply applying patches. Organizations should use this incident to assess and enhance their overall security programs, focusing on vulnerability management processes, dependency tracking, security testing integration, and continuous monitoring capabilities. By building comprehensive security practices around these foundational elements, organizations can better protect themselves not only from these specific vulnerabilities but from the inevitable future security challenges that will emerge.

Essential Action Items

  • Immediately identify all Apache Struts installations in your environment
  • Prioritize patching internet-facing and business-critical applications to versions 6.8.0 or 7.1.1
  • Implement enhanced disk usage monitoring and alerting for vulnerable systems
  • Deploy compensating controls such as WAF rules and rate limiting until patching is complete
  • Establish emergency response procedures for rapid disk space recovery
  • Plan migration strategies for legacy unsupported Struts versions
  • Conduct post-incident review to identify security program improvements
  • Maintain ongoing vulnerability scanning and patch management disciplin