Summary
This is an Expression Language Injection vulnerability (CWE-917) in Apache Struts affecting applications that use the Bean Validation plugin. A validation message that places the submitted value into its text may be evaluated as an expression instead of being shown as text. This may lead to remote code execution. The issue occurs with validation constraints whose standard message already includes the value being validated.
Per the CVSS vector (8.8, high severity), the attack is carried out over the network with low complexity. The attacker needs a low-privileged login, and no user interaction is required. Successful exploitation fully compromises confidentiality, integrity and availability.
Affected versions are 2.5.0–2.5.33, 6.0.0–6.12.0 and 7.0.0–7.4.0. Struts 7 is affected only when the OGNL allowlist is disabled; it is enabled by default. Applications not using the Bean Validation plugin are not affected. The vulnerability is not currently listed in the CISA KEV catalog.
Who is affected
Organizations running Java web applications on Apache Struts (2.5.x, 6.x or 7.x) with the Bean Validation plugin enabled.
What to do
- Upgrade Apache Struts to version 6.13.0 or 7.5.0, which fix the issue, as recommended by the vendor.
- No fixed version is listed for the 2.5.x branch in the record. Check the official S2-081 advisory (https://cwiki.apache.org/confluence/display/WW/S2-081) and plan a move to a supported branch.
- Inventory your applications and check whether they use the Bean Validation plugin. Applications without it are not affected.
- On Struts 7, verify that the OGNL allowlist is enabled (the default) and do not disable it.
- Review validation constraints whose messages include the validated value, and monitor logs for unusual requests.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
- cwiki.apache.org/confluence/display/WW/S2-081 vendor advisory
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.