CVE-2016-4430: Apache Struts CSRF Vulnerability

Summary

17/05/2022
Yes i
High
8.8

CVE-2016-4430: Apache Struts CSRF Vulnerability. Affects org.apache.struts.xwork:xwork-core versions >= 2.3.20, < 2.3.29. Fixed in 2.3.29. 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 vulnerability identified as CVE-2016-4430 affects Apache Struts versions 2.3.20 through 2.3.28.1. This vulnerability specifically relates to token validation, which is mishandled, allowing remote attackers to conduct cross-site request forgery (CSRF) attacks. CSRF attacks can lead to unauthorized actions being performed on behalf of authenticated users, potentially resulting in data breaches, unauthorized access, or other malicious activities.

Vulnerability Detail

The vulnerability in Apache Struts 2 2.3.20 through 2.3.28.1 arises from the mishandling of token validation. This allows remote attackers to exploit the application's lack of proper CSRF protection and perform unauthorized actions on behalf of authenticated users. The specific vectors through which the attack can be carried out are unspecified. However, it is important to note that CSRF attacks can have severe consequences, including data manipulation, unauthorized access, and potential compromise of sensitive information.

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.29

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

If upgrading the Apache Struts package is not immediately feasible, a possible workaround is to implement CSRF protection manually. This can be achieved by generating and validating unique tokens for each user session and including them in all requests that modify state or perform sensitive actions. The tokens should be securely stored and verified on the server-side to prevent CSRF attacks. Here is an example of how to implement CSRF protection using the OWASP Java Encoder library:

import org.owasp.encoder.Encode;

public class CsrfUtils {
  public static String generateToken() {
    // Generate a unique token for the current user session
    String token = /* Generate token logic */;
    return Encode.forHtmlAttribute(token);
  }

  public static boolean validateToken(String token) {
    // Validate the token against the stored value for the current user session
    String storedToken = /* Retrieve stored token logic */;
    return token.equals(storedToken);
  }
}

Conclusion

The Apache Struts CSRF vulnerability (CVE-2016-4430) is a high-severity vulnerability that allows remote attackers to conduct CSRF attacks on affected applications. To mitigate this vulnerability, it is crucial to upgrade the Apache Struts package to a version beyond 2.3.28.1 or implement CSRF protection manually. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.struts.xwork:xwork-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 a MVC (Model-View-Controller) architecture.

CSRF (Cross-Site Request Forgery) is a type of attack where a malicious website tricks a user's browser into performing an unwanted action on a different website where the user is authenticated.

CSRF attacks can lead to unauthorized actions being performed on behalf of authenticated users, potentially resulting in data breaches, unauthorized access, or other malicious activities.

To fix this vulnerability, it is recommended to upgrade the Apache Struts package to a version beyond 2.3.28.1. Alternatively, you can implement CSRF protection manually by generating and validating unique tokens for each user session.

If upgrading the Apache Struts package is not immediately feasible, a possible workaround is to implement CSRF protection manually by generating and validating unique tokens for each user session.

Related vulnerabilities

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

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.29

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 →

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