Security Experts:

Critical Apache Struts 2 Flaw Allows Remote Code Execution

Updates released on Wednesday for the Apache Struts 2 open source development framework address a critical vulnerability that can be exploited for remote code execution.

The flaw, tracked as CVE-2018-11776, affects Struts 2.3 through 2.3.34, Struts 2.5 through 2.5.16, and possibly unsupported versions of the framework.

Patches are included in Struts 2.3.35 and 2.5.17. A temporary workaround has also been made available, but Struts developers have described it as “weak” and advised users to install the updates as soon as possible.

“It is possible to perform a RCE attack when namespace value isn't set for a result defined in underlying xml configurations and in same time, its upper action(s) configurations have no or wildcard namespace. Same possibility when using url tag which doesn’t have value and action set and in same time, its upper action(s) configurations have no or wildcard namespace,” Struts developers wrote in an advisory.

The vulnerability was discovered by a researcher from Semmle, a code analysis company that announced its global launch this week, along with $21 million in funding.

Semmle has published a blog post containing technical details on the vulnerability. According to the company, the issue was reported to the Apache Struts Security Team on April 10 and code patches were released on June 25.

“This vulnerability affects commonly-used endpoints of Struts, which are likely to be exposed, opening up an attack vector to malicious hackers. On top of that, the weakness is related to the Struts OGNL language, which hackers are very familiar with, and are known to have been exploited in the past,” said Man Yue Mo, the Semmle researcher who discovered CVE-2018-11776.

“Attackers can attack vulnerable applications by injecting their own namespace as a parameter in an HTTP request. The value of that parameter is insufficiently validated by the Struts framework, and can be any OGNL string. OGNL (Object-Graph Navigation Language) is a powerful domain-specific language that is used to customize Apache Struts’ behavior,” the researcher explained.

Semmle has only made public limited details in an effort to prevent malicious exploitation. The company last year discovered another Apache Struts vulnerability that ended up being exploited in the wild. However, the new flaw is even more severe, Man Yue Mo said.

Apache Struts vulnerabilities can pose a significant risk to organizations. A flaw affecting the framework was exploited in the massive Equifax breach that impacted over 140 million individuals.

Related: One Year Later, Hackers Still Target Apache Struts Flaw

Related: "Zealot" Apache Struts Attacks Abuses NSA Exploits

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.