S2–016 (Apache Struts) Remote Code Execution Vulnerability
Apache Struts versions 2.0.0 to 2.3.15 evaluate user-supplied parameters with action:, redirect:, or redirectAction: prefixes as OGNL expressions, allowing remote attackers to execute arbitrary code. Attackers can also conduct URL redirection attacks.
medium.com
Published on medium.com
A remote users can execute an arbitrary code on the affected system. A remote user can conduct URL redirection attacks as well.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the framework fails to sanitise user input in parameters with action:, redirect:, or redirectAction: prefixes, allowing OGNL expression injection.
Impact
A remote attacker could execute arbitrary code on the affected system and conduct URL redirection attacks.
What the attacker needed
Target runs Apache Struts 2.0.0 to 2.3.15; No authentication required
The fix
The vendor has issued a fix ([redacted]).
How it was found
- Identify a target running Apache Struts 2.0.0 to 2.3.15.
- Craft a URL with a redirect: parameter containing an OGNL expression.
- Send the request to the target to execute arbitrary code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Apache Struts is a framework for building Java web applications. In this vulnerability, the framework mistakenly treats certain URL parameters as code (OGNL expressions) and runs them, letting an attacker run their own commands on the server. This is known as remote code execution.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.