Cross-site Scripting in Apache Struts
Multiple Cross-Site Scripting (XSS) in XWork generated error pages in Apache Struts. By default, XWork doesn't escape action's names in automatically generated error page, allowing for a successful XSS attack. When Dynamic Method Invocation (DMI) is enabled, the action name is generated dynamically base on request parameters. This allows to call non-existing page and method to produce error page with injected code as below. As of Struts 2.2.3 the action names are escaped when automatically generated error pages are rendered.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.apache.struts:struts2-core | < 2.2.3 | 2.2.3 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2011-1772
- https://github.com/apache/struts
- https://issues.apache.org/jira/browse/WW-3579
- http://jvn.jp/en/jp/JVN25435092/index.html
- http://jvndb.jvn.jp/jvndb/JVNDB-2011-000106
- http://secureappdev.blogspot.com/2011/05/apache-struts-2-xwork-webwork-reflected.html
- http://struts.apache.org/2.2.3/docs/version-notes-223.html
- http://struts.apache.org/2.x/docs/s2-006.html
- Weakness (CWE)
CWE-79- Platform
- Java / Kotlin (Maven)
- Package
org.apache.struts:struts2-core- Disclosed
- 17.05.2022
- Updated
- 11.10.2026 12:21
Sources and licenses
OSV / GitHub Advisory Database - GHSA-56f8-g68r-j699 - CC BY 4.0
Vulnerability history: org.apache.struts:struts2-core
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 60
- First → latest
- 10.2018 01.2026
- Without a fix
- 0
- Exploited in attacks
- 6
Severity breakdown
- Critical 14
- High 25
- Medium 20
- Low 1
Disclosures per year
- 2018: 6
- 2019: 0
- 2020: 0
- 2021: 1
- 2022: 45
- 2023: 4
- 2024: 1
- 2025: 2
- 2026: 1
-
Cross-site Scripting in Apache Struts this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.