CVE-2011-2087: Apache Struts Multiple XSS Vulnerabilities

Summary

17/05/2022
Yes i
Moderate
Not published

CVE-2011-2087: Apache Struts Multiple XSS Vulnerabilities. Affects org.apache.struts:struts2-parent versions < 2.2.3. Fixed in 2.2.3. 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 Penetration testing for web, API and mobile 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 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 in question affects the javatemplates plugin in Apache Struts 2.x before version 2.2.3. This plugin is responsible for handling various components in web forms, such as files, hidden fields, passwords, radio buttons, reset buttons, select boxes, submit buttons, and text fields. The vulnerability allows remote attackers to inject arbitrary web script or HTML by exploiting improper handling of value attributes in these component handlers.

Vulnerability Detail

The vulnerability arises from a lack of proper input validation and sanitization in the affected component handlers. By submitting specially crafted parameter values to a .action URI, an attacker can inject malicious scripts or HTML code into the web application. This can lead to various security issues, including cross-site scripting (XSS) attacks, where the attacker can execute arbitrary code in the context of the victim's browser. This can result in session hijacking, data theft, defacement of web pages, and other malicious activities.

How To Fix

Minimum fixed version

2.2.3

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 to the latest version of Apache Struts is not immediately feasible, a temporary workaround can be implemented. This involves implementing custom input validation and sanitization mechanisms for the affected component handlers. Developers should carefully validate and sanitize user input before using it in the value attributes of the component handlers. This can be done using appropriate input validation libraries or by implementing custom validation logic in the application code.

Conclusion

The Apache Struts Multiple XSS Vulnerabilities pose a significant security risk to web applications using the javatemplates plugin in Apache Struts 2.x. It is crucial to promptly upgrade to version 2.2.3 or later to mitigate these vulnerabilities. If immediate upgrade is not possible, developers should implement custom input validation and sanitization mechanisms as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

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

Share this vulnerability

FAQ

Apache Struts 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 javatemplates plugin in Apache Struts is responsible for handling various components in web forms, such as files, hidden fields, passwords, radio buttons, reset buttons, select boxes, submit buttons, and text fields.

Cross-site scripting (XSS) is a type of security vulnerability where an attacker can inject malicious scripts or HTML code into a web application. This can lead to various security issues, including session hijacking, data theft, defacement of web pages, and other malicious activities.

To fix this vulnerability, it is recommended to upgrade to Apache Struts version 2.2.3 or later. This version includes the necessary patches and improvements to mitigate the XSS vulnerabilities in the javatemplates plugin.

If upgrading to the latest version of Apache Struts is not immediately feasible, a temporary workaround can be implemented. This involves implementing custom input validation and sanitization mechanisms for the affected component handlers.

Related vulnerabilities

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

How To Fix

Minimum fixed version

2.2.3

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