VDB
Sign up
CRITICAL9.8

GHSA-j68f-8h6p-9h5q

Struts ParameterInterceptor vulnerability allows remote command execution

Quick fix

GHSA-j68f-8h6p-9h5q — org.apache.struts:struts2-core: upgrade to the fixed version with the command below.

# pom.xml: bump <version>2.3.1.2</version> for org.apache.struts:struts2-core

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Maven/org.apache.struts:struts2-core
Introduced in: 2.0.0Fixed in: 2.3.1.2
Fix# pom.xml: bump <version>2.3.1.2</version> for org.apache.struts:struts2-core

References