I spoke to Synopsys technical evangelist Tim Mackey about the newly discovered Struts vulnerability. “Modern software is increasingly complex, and identifying how data passes through it should be a priority for all software development teams,” Tim noted. “To give you some background, developers commonly use libraries of code, or development paradigms which have proven efficient, when creating new applications or features. This attribute is a positive when the library or paradigm is of high quality, but when a security defect is uncovered, this same attribute often leads to a pattern of security issues.
“In the case of CVE-2018-11776,” Tim continued, “the root cause was a lack of input validation on the URL passed to the Struts framework. In both 2016 and 2017, the Apache Struts community disclosed a series of remote code execution vulnerabilities. These vulnerabilities all related to the improper handling of unvalidated data. However, unlike CVE-2018-11776, the prior vulnerabilities were all in code within a single functional area of the Struts code. This meant that developers familiar with that functional area could quickly identify and resolve issues without introducing new functional behaviors.
“CVE-2018-11776, on the other hand, operates at a far deeper level within the code, which in turns requires a deeper understanding of not only the Struts code itself but the various libraries used by Struts. It is this level of understanding which is of greatest concern—and this concern relates to any library framework. Validating the input to a function requires a clear definition of what is acceptable. It equally requires that any functions available for public use document how they use the data passed to them. Absent the contract such definitions and documentation form, it’s difficult to determine if the code is operating correctly or not. This contract becomes critical when patches to libraries are issued, as it’s unrealistic to assume that all patches are free from behavioral changes.”
Shortly after the Apache Software Foundation released its patch, a proof-of-concept exploit of the vulnerability was posted on GitHub. The PoC included a Python script that allows for easy exploitation. The firm that discovered the PoC, threat intelligence company Recorded Future, also said that it has spotted chatter on underground forums revolving around the flaw’s exploitation. Companies not wanting to become the next Equifax should immediately identify what version of Apache Struts they have in use and where, and apply the patch as needed.