CVE-2026-133637
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. Its Bean Validation plugin validates actions with Bean Validation constraint annotations and turns each constraint violation into a Struts field or action error message.
A remote code execution (RCE) vulnerability (CVE-2026-133637) has been identified in the Apache Struts Bean Validation plugin, which allows attackers to have a submitted value evaluated as an OGNL expression when it appears in a validation error message. This can happen with validation constraints whose standard message already includes the value being validated, without any change by the developer.
Per OWASP: Code Injection is the general term for attack types which consist of injecting code that is then interpreted/executed by the application. This type of attack exploits poor handling of untrusted data.
This issue affects multiple versions of Apache Struts.
Details
Module Info
- Product: Apache Struts 2
- Affected packages:
org.apache.struts:struts2-bean-validation-plugin - Affected versions: >=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-bean-validation-plugin
- 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-bean-validation-plugin package in multiple versions of Apache Struts. After the Bean Validation provider validates an action, BeanValidationInterceptor converts each ConstraintViolation into a Struts error. It takes the provider's already interpolated message, ConstraintViolation#getMessage(), and passes it to the text provider as a message key:
for (ConstraintViolation<Object> constraintViolation : constraintViolations) {
String key = constraintViolation.getMessage();
String message = key;
try {
message = validatorContext.getText(key);
if (convertToUtf8 && StringUtils.isNotBlank(message)) {
message = new String(message.getBytes(convertFromEncoding), "UTF-8");
}
} catch (Exception e) {
LOG.error("Error while trying to fetch message: {}", key, e);
}Some standard constraints build their message from the value being validated, so the interpolated message can contain text the user submitted. No resource bundle has a key matching that text, so the text provider falls back to using the key itself as the default message and runs it through TextParseUtil.translateVariables. Any ${...} or %{...} sequence in the submitted value is therefore evaluated as an OGNL expression against the value stack, which can lead to remote code execution. In Struts 7 the issue is exploitable only when the OGNL allowlist, which is enabled by default, has been disabled. Applications that do not use the Bean Validation plugin are not affected.
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
- Adam Korczynski from Ada Logics, for Anthropic (finder)