Apache Struts2 RCE

By
Jijith Rajan
Published on
16 Jun 2021
Vulnerability

Apache Struts is a free and open-source framework used to build Java web applications. The use of Object Graph Navigation Language (OGNL) expressions in the Apache Struts smooth the way for attackers to execute arbitrary code remotely. On sending a malicious Content-Type, Content-Disposition, or Content-Length HTTP header with a Content-Type header containing a #cmd= string an incorrect exception handling and error message will be generated as the Jakarta Multipart parser fails to validate the file-upload attempts. This permits remote attackers to execute arbitrary commands on the vulnerable servers.

Mitigation / Precaution

  • We advise you to update Apache Struts installation to Struts 2.3.32 or Struts 2.5.10.1 or above to fix this vulnerability.
Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.

Written by
Jijith Rajan
Jijith Rajan
Cyber Security Engineer
Find website security issues in a flash
Improve your website's security posture with proactive vulnerability detection.
Free website security assessment
Experience the power of automated penetration testing & contextual reporting.