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
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2011-3923

GHSA ID

GHSA-j68f-8h6p-9h5q

Source code

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