Thousands of Java applications vulnerable to nine-month-old remote code execution exploit

A flaw in the Apache Commons Collections component puts Java application servers at risk of compromise

A popular Java library has a serious vulnerability, discovered over nine months ago, that continues to put thousands of Java applications and servers at risk of remote code execution attacks.

The flaw is located in Apache Commons, a library that contains a widely used set of Java components maintained by the Apache Software Foundation. The library is used by default in multiple Java application servers and other products including Oracle WebLogic, IBM WebSphere, JBoss, Jenkins and OpenNMS.

The flaw is specifically in the Collections component of Apache Commons and stems from unsafe deserialization of Java objects. In programming languages, serialization is the process of converting data to a binary format for storing it in a file or memory, or for sending it over the network. Deserialization is the reverse of that process.

The vulnerability was first reported at a security conference in January by researchers Chris Frohoff and Gabriel Lawrence, but it didn't receive a lot of attention, possibly because many people believe the responsibility for preventing deserialization attacks lies with Java application developers, not the library's creators.

"I don't feel the library is to blame, though improvements certainly could be made," said Carsten Eiram, the chief research officer at vulnerability intelligence firm Risk Based Security, via email. "End of day, untrusted input should never be blindly deserialized. Developers should understand how a library works and validate input passed to it instead of trusting or hoping the library does it safely for them."

The vulnerability received a new wave of exposure Friday after researchers from a company called FoxGlove Security released proof-of-concept exploits based on it for WebLogic, WebSphere, JBoss, Jenkins and OpenNMS.

In response, Oracle issued a security alert Tuesday containing temporary mitigation instructions for the WebLogic Server while the company is working on a permanent patch. The Apache Commons Collections developers have also started working on a fix.

Apache Commons Collections contains an InvokerTransformer class that performs reflection, or dynamic method invocation, and which can be included in a serialized object. This can allow an attacker to craft a user-supplied object with malicious content that would get executed when the object is deserialized by a Java application using the Apache Commons library.

The InvokerTransformer class itself is not bad and neither is serialization, but it's when they're combined that the security issue appears, said Joshua Corman, the CTO of Sonatype, a software supply chain automation company that helps developers track and manage the components they use in their applications.

Corman and Bruce Mayhew, a security researcher with the company, believe that this issue is not limited to Apache Commons Collections and that other Java components might have the same problem.

"I guarantee you that there are now a bunch of people who are combing through all the most common components looking for serializable classes that allow for some sort of command execution," Mayhew said. "These are probably both good and bad guys."

Even in the context of Apache Commons Collections, InvokerTransformer might not be the only vulnerable class, according to discussions on the component's bug tracker. There are three others that have been singled out as candidates for having the same problem.

The FoxGlove Security researchers searched the public software projects hosted on GitHub for use of "commons-collection" and found 1,300 results. However, there are likely thousands more custom-built Java applications in enterprise environments that use the library.

Even though there's a strong possibility that this problem goes beyond this particular component, until a patch is released, developers should consider whether they can remove commons-collections from the classpath or remove the InvokerTransformer class from the common-collections jar file. Such changes should be considered carefully, as they could break applications.

Join the Good Gear Guide newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?