CVE-2012-4387: Denial of Service in Apache Struts
Summary
CVE-2012-4387: Denial of service in Apache Struts. Affects org.apache.struts.xwork:xwork-core versions >= 2.0.0, < 2.3.4.1. Fixed in 2.3.4.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Apache Struts is a popular open-source framework for developing Java web applications. It provides a set of reusable components and a MVC (Model-View-Controller) architecture for building scalable and maintainable web applications. The Apache Struts 2.0.0 through 2.3.4 version is affected by a denial of service vulnerability that allows remote attackers to consume excessive CPU resources by sending a request with a long parameter name. This parameter name is processed as an OGNL (Object-Graph Navigation Language) expression, leading to the CPU consumption.
Vulnerability Detail
The vulnerability in Apache Struts allows an attacker to cause a denial of service by exploiting the way the framework handles long parameter names. By sending a specially crafted request with a long parameter name, an attacker can trigger the execution of an OGNL expression, which consumes excessive CPU resources. This can lead to a significant degradation in the performance of the affected server, potentially impacting the availability of the application. The vulnerability has a moderate severity rating and was first published on May 17, 2022.
How To Fix
Latest published version: 2.3.37 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.3.4.1
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. However, as a general best practice, it is recommended to implement proper input validation and sanitization techniques to mitigate the risk of similar vulnerabilities. By validating and sanitizing user input, developers can prevent the execution of malicious OGNL expressions and reduce the likelihood of a denial of service attack.
Conclusion
The denial of service vulnerability in Apache Struts can be mitigated by upgrading to the patched version of the framework. Developers should ensure that their project's dependencies are updated to use the fixed version of the 'org.apache.struts:struts2-core' package. Additionally, implementing proper input validation and sanitization techniques can help reduce the risk of similar vulnerabilities. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.apache.struts.xwork:xwork-core →
FAQ
Apache Struts is an open-source framework for developing Java web applications. It provides a set of reusable components and a MVC architecture for building scalable and maintainable web applications.
The vulnerability allows remote attackers to cause a denial of service by consuming excessive CPU resources. This can lead to a significant degradation in the performance of the affected server, potentially impacting the availability of the application.
To fix the vulnerability, it is recommended to upgrade the Apache Struts version to 2.3.4.1 or later. This version includes a fix for the denial of service vulnerability. Developers should update their project's dependencies to use the patched version of the 'org.apache.struts:struts2-core' package.
There is no specific workaround provided for this vulnerability. However, implementing proper input validation and sanitization techniques can help mitigate the risk of similar vulnerabilities.
You can find more information about this vulnerability in the CVE-2012-4387 advisory and the GitHub Security Advisory GHSA-hrgc-54mv-58gv.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.struts.xwork:xwork-core.