Critical RCE Vulnerability in Apache Struts (S2-067)
A critical remote code execution vulnerability (CVE-2024-53677) in Apache Struts versions 2.0.0 through 6.3.0.2 allows attackers to leverage path traversal during file uploads to execute arbitrary code.
CVE search metadata
CVE search record: CVE-2024-53677. Severity: critical. CVSS: 9.8. EPSS: 78.20%. KEV: no. Product: Struts (2.0.0-6.3.0.2). Brief: Critical RCE Vulnerability in Apache Struts (S2-067). Brief link: https://feed.craftedsignal.io/briefs/2026-09-apache-struts-rce/
Apache Struts versions 2.0.0 through 6.3.0.2 are vulnerable to a remote code execution (RCE) flaw, tracked as CVE-2024-53677 (also identified as S2-067). The vulnerability resides in the framework's file upload logic, specifically within the FileUploadInterceptor component. An unauthenticated attacker can manipulate file upload parameters to perform path traversal, enabling them to upload arbitrary files to locations outside of the intended directory. By placing executable files, such as .jsp scripts, into web-accessible directories, an attacker can achieve remote code execution. Because this vulnerability involves a significant change to the file upload mechanism, the vendor notes that the fix in version 6.4.0 is not backward compatible, requiring organizations to refactor existing Action classes. The CVSS 9.8 rating reflects the ease of exploitation, as it requires no privileges or user interaction.
Attack Chain
- Attacker identifies an internet-facing application utilizing a vulnerable version of the Apache Struts framework.
- Attacker crafts a malicious HTTP POST request targeting the /upload.action endpoint.
- Attacker injects path traversal sequences (e.g., ../) into the filename parameter of the multipart/form-data request body.
- The FileUploadInterceptor fails to sanitize the input, allowing the attacker to traverse the filesystem directory structure.
- The server writes the attacker-supplied malicious file (e.g., a webshell) to an arbitrary, attacker-controlled location within the web root.
- Attacker sends a secondary HTTP GET request to the path of the newly uploaded file to trigger script execution.
- The application server executes the malicious script, granting the attacker arbitrary code execution on the underlying host.
Impact
Successful exploitation allows for full system compromise, including unauthorized access to sensitive data, potential lateral movement within the network, and complete control over the affected application server. This vulnerability affects all organizations utilizing Apache Struts within the specified version range (2.0.0-6.3.0.2).
Recommendation
- Upgrade all Apache Struts deployments to version 6.4.0 or later immediately to patch CVE-2024-53677.
- Audit web server logs for suspicious POST requests targeting "/upload.action" that contain path traversal sequences (e.g., "..", "%2e%2e") in the filename or form parameters.
- Perform code refactoring as necessary to support the new file upload mechanism introduced in version 6.4.0, as it is not backward compatible with previous implementations.
- Implement Web Application Firewall (WAF) rules to inspect multipart form data for traversal characters in the filename field.
Immediate actions
Upgrade all instances of Apache Struts to 6.4.0 or later
Mitigations
Transition to the new File Upload Mechanism in Struts 6.4.0
CVE-2024-53677
Detection coverage 1
Detects CVE-2024-53677 Exploitation - Path Traversal in Struts File Upload
criticalDetects potential path traversal exploitation attempts targeting Apache Struts file upload functionality
Detection queries are available on the platform. Get full rules →