Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security //

Web Application Development

8/24/2018
09:05 AM
Larry Loeb
Larry Loeb
Larry Loeb
50%
50%

Apache Struts Critical Weakness Found, Patched

The open source framework for Java-based web apps has a critical flaw the Apache Software Foundation is trying to counter.

A critical-level remote code execution vulnerability (CVE-2018-11776) has been identified in Apache Struts. Struts is an open source framework used in the development of Java-based web apps. The vulnerability has been classified as critical because the flaw could allow remote attackers to execute their code on a server that is running the Struts-developed app.

The Apache Software Foundation announced that it has released a new version of Struts that patches the issue. Affected versions include Struts 2.3 through Struts 2.3.34, as well as Struts 2.5 through Struts 2.5.16. ASF strongly recommends that users upgrade to Struts 2.3.35 or Struts 2.5.17 immediately, even though a workaround that they characterize as "weak" is possible.

Adding urgency, Tenable has blogged, "A working proof of concept (PoC) has been discovered and verified on Github by Tenable's research team. In addition, there are indications that attackers are already probing for vulnerable Apache Struts instances."

Man Yue Mo from the Semmle Security Research team has been credited with identifying the problem.

A previous vulnerability in Struts (CVE-2017-5638) that was also discovered by Semmle has been blamed as the cause of the massive data breach that occurred at Equifax. In that instance, the financial records of more than 140 million users were exposed.

There are specific configurations of Struts that enable the vulnerability.

They are:

  1. The alwaysSelectFullNamespace flag is set to true in the Struts configuration. This automatically occurs if the application uses the Struts Convention plugin.
  2. The application's Struts configuration file contains an tag that does not specify the optional namespace attribute or specifies a wildcard namespace ("/*").

Dayne Topkin via Unsplash
Dayne Topkin via Unsplash

Semmle notes, "If your application's configuration does not meet these two conditions, you are likely not vulnerable to the two attack vectors described. However, new attack vectors that apply to different configurations may be discovered in the near future."

The researchers found that vulnerable applications may be attacked by threat actors injecting their own namespace as a parameter in an HTTP request. It seems that 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 domain-specific language that is used to customize Apache Struts' behavior.

Mo describes the process that led to the exposure of the vulnerability in a blog. He looks at the underlying data flow of Struts and how libraries that are used in determining results will affect it.

He also wonders how this vulnerability was missed by everyone. He thinks they were just not looking widely enough.

He notes in the blog that, "In my opinion, it's because the similarities between [previous vulnerabilities] are, in a sense, local, in that they all occur in a similar location in the source code (all in the Rest plugin). They are linked by the tainted source, rather than the location of the source code, so any software or tool that would successfully find variants like this would need to be able to perform […] semantic analysis across the whole code base."

What should worry the security professional is that further vulnerabilities may be exposed by this approach to Struts. Attention in the upcoming days will be needed.

Correction (8/24/2018): This article was updated to correct the mention of the Equifax breach that had identified the company as Experian.

Related posts:

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Commentary
How SolarWinds Busted Up Our Assumptions About Code Signing
Dr. Jethro Beekman, Technical Director,  3/3/2021
News
'ObliqueRAT' Now Hides Behind Images on Compromised Websites
Jai Vijayan, Contributing Writer,  3/2/2021
News
Attackers Turn Struggling Software Projects Into Trojan Horses
Robert Lemos, Contributing Writer,  2/26/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Current Issue
2021 Top Enterprise IT Trends
We've identified the key trends that are poised to impact the IT landscape in 2021. Find out why they're important and how they will affect you today!
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-20663
PUBLISHED: 2021-03-05
Cross-site scripting vulnerability in in Role authority setting screen of Movable Type 7 r.4705 and earlier (Movable Type 7 Series), Movable Type Advanced 7 r.4705 and earlier (Movable Type Advanced 7 Series), Movable Type 6.7.5 and earlier (Movable Type 6.7 Series), Movable Type Premium 1.39 and ea...
CVE-2021-20664
PUBLISHED: 2021-03-05
Cross-site scripting vulnerability in in Asset registration screen of Movable Type 7 r.4705 and earlier (Movable Type 7 Series), Movable Type Advanced 7 r.4705 and earlier (Movable Type Advanced 7 Series), Movable Type 6.7.5 and earlier (Movable Type 6.7 Series), Movable Type Premium 1.39 and earlie...
CVE-2021-20665
PUBLISHED: 2021-03-05
Cross-site scripting vulnerability in in Add asset screen of Contents field of Movable Type 7 r.4705 and earlier (Movable Type 7 Series), Movable Type Advanced 7 r.4705 and earlier (Movable Type Advanced 7 Series), Movable Type Premium 1.39 and earlier, and Movable Type Premium Advanced 1.39 and ear...
CVE-2021-28031
PUBLISHED: 2021-03-05
An issue was discovered in the scratchpad crate before 1.3.1 for Rust. The move_elements function can have a double-free upon a panic in a user-provided f function.
CVE-2021-28032
PUBLISHED: 2021-03-05
An issue was discovered in the nano_arena crate before 0.5.2 for Rust. There is an aliasing violation in split_at because two mutable references can exist for the same element, if Borrow<Idx> behaves in certain ways. This can have a resultant out-of-bounds write or use-after-free.