CVE-2026-133642
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Apache Struts is a popular open-source web application framework for developing Java EE web applications. For every request it handles, Struts maps the request path to an action, and it checks that path against the struts.action.excludePattern setting to decide whether to handle the request at all.
An authorization bypass vulnerability (CVE-2026-133642) has been identified in the Apache Struts action mapping, which allows attackers to bypass URL-based access restrictions placed in front of Struts. A request can be authorized by the servlet container, a filter or a reverse proxy under one path and then executed by Struts as a different action. For the same reason, a request whose path matches struts.action.excludePattern can still be handled by Struts.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Apache Struts 2.
Details
Module Info
- Product: Apache Struts
- Affected packages:
org.apache.struts:struts2-core - Affected versions: >=2.1.2 <=2.3.37, >=2.5.0 <=2.5.33, >=6.0.0 <=6.12.0, >=7.0.0 <=7.4.0
- GitHub repository: https://github.com/apache/struts
- Published packages: https://central.sonatype.com/artifact/org.apache.struts/struts2-core
- Package manager: Maven
- Fixed in:
- OSS Apache Struts 6.13.0, 7.5.0
- NES for Apache Struts
Vulnerability Info
This High-severity vulnerability is found in the org.apache.struts:struts2-core package in multiple versions of Apache Struts 2. When Struts decides which action a request invokes, it does not use the path the servlet container has already decoded and normalised. RequestUtils.getServletPath takes the container's servlet path, and whenever the raw request URI does not end with it, rebuilds the path from the raw URI instead:
public static String getServletPath(HttpServletRequest request) {
String servletPath = request.getServletPath();
String requestUri = request.getRequestURI();
// Detecting other characters that the servlet container cut off (like anything after ';')
if (requestUri != null && servletPath != null && !requestUri.endsWith(servletPath)) {
int pos = requestUri.indexOf(servletPath);
if (pos > -1) {
servletPath = requestUri.substring(requestUri.indexOf(servletPath));
}
}
...
}
When the servlet path is empty, RequestUtils.getUri also falls back to the raw request URI. DefaultActionMapper.getMapping then works on this rebuilt value and cuts it at the first ; itself:
String uri = RequestUtils.getUri(request);
int indexOfSemicolon = uri.indexOf(';');
uri = (indexOfSemicolon > -1) ? uri.substring(0, indexOfSemicolon) : uri;
The raw URI and the container's decoded, normalised path can differ, for example through path parameters or encoded characters. A security-constraint, a URL-pattern filter or a proxy rule therefore evaluates one path while Struts maps the request to an action from another. An attacker can send a request that the front-end restriction lets through and that Struts resolves to a restricted action. PrepareOperations.isUrlExcluded matches struts.action.excludePattern against the same RequestUtils.getUri value, so a request for an excluded path can still be dispatched to Struts. Applications that enforce authorization inside Struts, for example with an interceptor on the action, apply it to the action that actually runs and are not exposed to the bypass.
Mitigation
Only recent versions of Apache Struts are community-supported. Older lines are End-of-Life and will not receive any updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade affected applications to a supported version of Apache Struts.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Svyatoslav Berestovsky (finder)