CVE-2017-9804: Apache Struts - Custom URL Validation Vulnerability

Summary

16/10/2018
Yes i
High
7.5

CVE-2017-9804: Apache Struts allows entering a custom URL in a form field if built-in URLValidator is used. Affects org.apache.struts:struts2-core across 2 version ranges.

>= 2.3.7, < 2.3.34 >= 2.5.0, < 2.5.13

Fixed in 2.3.34 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Struts is an open-source framework for developing Java web applications. It provides a set of reusable components and a MVC (Model-View-Controller) architecture. The struts2-core package is a core component of Apache Struts that handles various functionalities, including form validation. This vulnerability affects versions 2.3.7 to 2.3.33 and 2.5 to 2.5.12 of the struts2-core package. The vulnerability arises when an application allows users to enter a URL in a form field and uses the built-in URLValidator for validation.

Vulnerability Detail

The vulnerability allows an attacker to prepare a specially crafted URL that can overload the server process during the validation of the URL. This vulnerability is a result of an incomplete fix for a previous vulnerability (S2-047 / CVE-2017-7672). By exploiting this vulnerability, an attacker can potentially disrupt the normal functioning of the server or perform other malicious activities.

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.7, < 2.3.34 2.3.34
  • >= 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

If upgrading to a patched version is not immediately feasible, a temporary workaround is to implement a custom URL validation logic that properly handles the validation of URLs entered by users. This can be done by implementing a custom validator or using a third-party library that provides secure URL validation functionality.

Conclusion

The Apache Struts vulnerability (CVE-2017-9804) allows attackers to overload the server process during URL validation. It is crucial to upgrade to the patched versions or implement a custom URL validation logic to mitigate the risk. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.struts:struts2-core →

Share this vulnerability

FAQ

Apache Struts is an open-source framework for developing Java web applications. It provides a set of reusable components and follows the MVC (Model-View-Controller) architecture.

Versions 2.3.7 to 2.3.33 and 2.5 to 2.5.12 of the struts2-core package are affected by this vulnerability.

Exploiting this vulnerability can lead to server overload or enable an attacker to perform other malicious activities.

To fix this vulnerability, it is recommended to upgrade the struts2-core package to version 2.3.34 or above for versions 2.3.x, and version 2.5.13 or above for versions 2.5.x.

A temporary workaround is to implement a custom URL validation logic that properly handles the validation of URLs entered by users.

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.7, < 2.3.34 2.3.34
  • >= 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