CVE-2016-4465: DoS attack vulnerability in Apache Struts 2 URLValidator

Summary

17/05/2022
Yes i
Moderate
5.3

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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.29 2.3.29
  • >= 2.5.0, < 2.5.13 2.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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.struts:struts2-core.

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.29 2.3.29
  • >= 2.5.0, < 2.5.13 2.5.13

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback