Skip to content

Struts ParameterInterceptor vulnerability allows remote command execution

Critical severity GitHub Reviewed Published Apr 22, 2022 to the GitHub Advisory Database • Updated Aug 16, 2023

Package

maven org.apache.struts:struts2-core (Maven)

Affected versions

>= 2.0.0, < 2.3.1.2

Patched versions

2.3.1.2

Description

Regular expression in ParametersInterceptor matches top['foo'](0) as a valid expression, which OGNL treats as (top['foo'])(0) and evaluates the value of 'foo' action parameter as an OGNL expression. This lets malicious users put arbitrary OGNL statements into any String variable exposed by an action and have it evaluated as an OGNL expression and since OGNL statement is in HTTP parameter value attacker can use blacklisted characters (e.g. #) to disable method execution and execute arbitrary methods, bypassing the ParametersInterceptor and OGNL library protections.

References

Published by the National Vulnerability Database Nov 1, 2019
Published to the GitHub Advisory Database Apr 22, 2022
Reviewed Nov 3, 2022
Last updated Aug 16, 2023

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS score

94.455%
(99th percentile)

CVE ID

CVE-2011-3923

GHSA ID

GHSA-j68f-8h6p-9h5q

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.