CVE-2026-106012
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Apache Tomcat is an open-source implementation of the Jakarta Servlet, Jakarta Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations, and Jakarta Authentication specifications. It serves Java web applications either as a standalone servlet container and HTTP server or embedded inside an application through the tomcat-embed-core artifact. Its Catalina servlet container (org.apache.tomcat:tomcat-catalina) supplies the request-processing pipeline, including Valves such as RewriteValve, along with connectors, realms, and session management.
An authorization bypass vulnerability (CVE-2026-106012) has been identified in the role checking of Apache Tomcat, which can give a forwarded or included request the wrong answer from HttpServletRequest.isUserInRole() when the check depends on a <security-role-ref> declared by the dispatch target. Tomcat resolved the role alias against the servlet the request was originally mapped to rather than the servlet the RequestDispatcher dispatched to, so an application that makes authorization decisions with isUserInRole() in the target servlet can grant or refuse access incorrectly.
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 Tomcat.
Module Info
- Product: Apache Tomcat
- Affected packages:
org.apache.tomcat:tomcat-catalina - Affected versions: >=7.0.0 <=7.0.109, >=8.5.0 <=8.5.100, >=9.0.0.M1 <=9.0.123, >=10.1.0-M1 <=10.1.61, >=11.0.0-M1 <=11.0.27
- GitHub repository: https://github.com/apache/tomcat
- Published packages: https://central.sonatype.com/artifact/org.apache.tomcat/tomcat-catalina
- Package manager: Maven
- Fixed in:
- OSS Apache Tomcat 9.0.124, 10.1.62, 11.0.29
- NES for Apache Tomcat v8.5.116
Vulnerability Info
This Low-severity vulnerability is found in the org.apache.tomcat:tomcat-catalina package in multiple versions of Apache Tomcat. The Servlet specification lets a servlet declare a <security-role-ref>, a private alias that maps a role name the servlet uses in its own code onto a real application role, and isUserInRole() consults that alias for the servlet that is currently handling the request. When one servlet hands a request to another with RequestDispatcher.forward() or include(), the servlet handling the request, and therefore the set of role aliases that applies, is the dispatch target.
In the affected releases, org.apache.catalina.connector.Request.isUserInRole() always takes the Context and the Wrapper from the request's original mapping:
// Identify the Realm we will use for checking role assignments
Context context = getContext();
if (context == null) {
return false;
}
...
Realm realm = context.getRealm();
if (realm == null) {
return false;
}
// Check for a role alias defined in a <security-role-ref> element
Wrapper wrapper = getWrapper();
if (wrapper != null) {
String realRole = wrapper.findSecurityReference(role);
if (realRole != null) {
return realm.hasRole(wrapper, userPrincipal, realRole);
}
}
// Check for a role defined directly as a <security-role>
return realm.hasRole(wrapper, userPrincipal, role);The dispatch does not change what those calls return. org.apache.catalina.core.ApplicationDispatcher knows its target servlet, but when it wraps the request for the target it passes only the target Context, and the resulting ApplicationHttpRequest does not override isUserInRole(), so the call falls through to the original Request:
wrapper = new ApplicationHttpRequest(hcurrent, context, crossContext);As a result, a call to isUserInRole() made inside the target servlet is answered with the source servlet's <security-role-ref> entries. If the target defines an alias that the source does not, the target's alias is not applied; if the source defines an alias with the same name, the source's mapping is applied instead. For a cross-context dispatch the role is also checked against the original application's Context and Realm rather than the target's. Depending on how the aliases line up, a user can be reported as holding a role the target servlet's configuration does not grant, or be refused a role it does grant.
Mitigation
Only recent versions of Apache Tomcat are community-supported. The community support version will not receive any updates to address this issue. For more information, see here.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a patched version of Apache Tomcat.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Moritz Theile (finder)