Skip to content

Cross-site Scripting in Apache Struts

Moderate severity GitHub Reviewed Published May 24, 2022 to the GitHub Advisory Database • Updated Feb 1, 2023

Package

maven org.apache.struts:struts2-core (Maven)

Affected versions

< 2.3.20

Patched versions

2.3.20

Description

When the Struts2 debug mode is turned on, under certain conditions an arbitrary script may be executed in the 'Problem Report' screen. Also if JSP files are exposed to be accessed directly it's possible to execute an arbitrary script.

It is generally not advisable to have debug mode switched on outside of the development environment. Debug mode should always be turned off in production setup. Also never expose JSPs files directly and hide them inside WEB-INF folder or define dedicated security constraints to block access to raw JSP files.

Struts >= 2.3.20 is not vulnerable to this attack. We recommend upgrading to Struts 2.3.20 or higher if turning off debug mode is not possible.

References

Published by the National Vulnerability Database Feb 27, 2020
Published to the GitHub Advisory Database May 24, 2022
Reviewed Nov 3, 2022
Last updated Feb 1, 2023

Severity

Moderate

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(77th percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

CVE ID

CVE-2015-2992

GHSA ID

GHSA-265r-pp83-gww7

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.