CVE-2016-4465: DoS attack vulnerability in Apache Struts 2 URLValidator
Summary
CVE-2016-4465: Apache Struts vulnerable to possible DoS attack when using URLValidator. Affects org.apache.struts:struts2-core across 2 version ranges.
>= 2.3.20, < 2.3.29
>= 2.5.0, < 2.5.13
Fixed in 2.3.29 or 2.5.13, depending on the release line you run. 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 2 is an open-source framework for developing Java web applications. It provides a set of tools and libraries to simplify the development process and enhance the security of web applications. The URLValidator class in Apache Struts 2 is responsible for validating URLs provided as input. However, versions 2.3.20 through 2.3.28.1 and 2.5.x before 2.5.1 are vulnerable to a denial of service (DoS) attack when a null value is passed for a URL field. This vulnerability can be exploited remotely by attackers to disrupt the normal functioning of the application.
Vulnerability Detail
The vulnerability (CVE-2016-4465) in Apache Struts 2 allows remote attackers to cause a denial of service (DoS) by providing a null value for a URL field. When the URLValidator class encounters a null value, it fails to handle it properly, leading to a DoS condition. This vulnerability can be exploited remotely, without requiring any authentication or user interaction. The impact of this vulnerability is a disruption of the affected application's availability, potentially leading to financial losses or reputational damage. The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 5.3, indicating a moderate severity level.
How To Fix
Latest published version: 7.4.0 as of 22 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 2.3.20, < 2.3.292.3.29 -
>= 2.5.0, < 2.5.132.5.13
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, developers can manually validate URL fields before passing them to the URLValidator class. This can be done by checking for null values and ensuring that a valid URL is provided. Here is an example of how to perform this validation in Java:
String url = ...; // URL input
if (url != null && !url.isEmpty()) {
// Perform URL validation
URLValidator validator = new URLValidator();
boolean isValid = validator.isValid(url);
// Further processing
}
By explicitly checking for null values and validating the URL separately, developers can mitigate the risk of a DoS attack.
Conclusion
In conclusion, the Apache Struts 2 URLValidator vulnerability (CVE-2016-4465) allows remote attackers to cause a denial of service (DoS) by providing a null value for a URL field. This vulnerability can be mitigated by upgrading to the fixed versions of Apache Struts 2 or by implementing a temporary workaround. For further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for org.apache.struts:struts2-core →
FAQ
Apache Struts 2 is an open-source framework for developing Java web applications. It provides a set of tools and libraries to simplify the development process and enhance the security of web applications.
The vulnerability allows remote attackers to cause a denial of service (DoS) by providing a null value for a URL field. This can lead to a disruption of the affected application's availability, potentially resulting in financial losses or reputational damage.
To fix this vulnerability, it is recommended to upgrade to a fixed version of Apache Struts 2. For versions 2.3.20 through 2.3.28.1, upgrade to version 2.3.29 or later. For versions 2.5.x before 2.5.1, upgrade to version 2.5.13 or later.
As a temporary workaround, developers can manually validate URL fields before passing them to the URLValidator class. This involves checking for null values and ensuring that a valid URL is provided.
The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 5.3, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.struts:struts2-core.