Cross-site Scripting in Apache Struts
Published 17 May 2022 · Updated 4 Dec 2024
Is your project on an affected org.apache.struts:struts2-core?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <2.2.3
- Fixed in
- 2.2.3
mvn versions:use-dep-version -Dincludes=org.apache.struts:struts2-core -DdepVersion=2.2.3 -DforceVersion=trueDetails
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.
Is GHSA-56f8-g68r-j699 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.apache.struts:struts2-core, and gives you the command that fixes it.
More advisories for org.apache.struts:struts2-core
- HighCVE-2025-68493Apache Struts 2 is Missing XML Validation · 11 Jan 2026
- HighCVE-2025-66675Apache Struts has a Denial of Service vulnerability · 10 Dec 2025
- HighCVE-2025-64775Apache Struts is Vulnerable to DoS via File Leak · 1 Dec 2025
- CriticalCVE-2024-53677Apache Struts file upload logic is flawed · 11 Dec 2024
- CriticalCVE-2023-50164Apache Struts vulnerable to path traversal · 7 Dec 2023
- HighCVE-2023-41835Apache Struts Improper Control of Dynamically-Managed Code Resources vulnerability · 5 Dec 2023
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2011-1772
- Packagegithub.com/apache/struts
- Linkissues.apache.org/jira/browse/WW-3579
- Linkjvn.jp/en/jp/JVN25435092/index.html
- Linkjvndb.jvn.jp/jvndb/JVNDB-2011-000106
- Linksecureappdev.blogspot.com/2011/05/apache-struts-2-xwork-webwork-reflected.html
- Linkstruts.apache.org/2.2.3/docs/version-notes-223.html
- Linkstruts.apache.org/2.x/docs/s2-006.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.