Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Skip to end of metadata
Go to start of metadata

Pre Gradle version

This page documents the usage with Gradle, the pre-Gradle documentation is here: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65865828

 

Sometimes the OFBIz code itself is not the culprit. OFBiz relies on many Java librairies, and if one of them has a flaw we can't always wait it's fixed to warn and protect our users. This is for instance what happened with the 2015 infamous Java serialization vulnerability. OFBiz was affected by 2 librairies: Apache Commons Collections and Apache Groovy . As you can see at OFBIZ-6726 - Update commons collections to 3.2.2 because of known possible exploit [CVE-2016-2170] Closed , we waited the Commons Collections update to fix the issue, because it was not much disclosed then.

But with the article above the buzz began to spread and we could not wait to be able to update Groovy. So a temporary workaround was adopted as explained in OFBIZ-6568 - Update Groovy to 2.4.5 version [CVE-2016-2170] Closed . Since then OFBIZ-6568 has been fixed and the temporary workaround for Groovy is now unnecessary.

RMI and other risks

You would though still at risk if you use RMI, JNDI, JMX or Spring and maybe other Java classes OFBiz does not use Out Of The Box (OOTB). So the PMC decided to comment out RMI OOTB  OFBIZ-6942 - Comment out RMI related code because of the Java deserialization issue [CVE-2016-2170] Closed . But we could do nothing to prevent the other possiblities (not concerned OOTB).

We also decided to provide a simple way to protect OFBiz instances from all possible Java serialization vulnerabilities. While working on the serialization vulnerability, I stumbled upon this article "Closing the open door of java object serialization" and decided notsoserial was the solution we needed. It was embedded in OFBiz and called by all running Gradle tasks until it was put in OFBiz Attic#notsoserial.So if you need a such protection you are still able to grab it from Attic and use it.

It easily protects you from all possible serialization vulnerabilities as explained in the notsoserial projectThe idea is simple: initially you don't know what to put in your whitelist because there are some objects in OFBiz you need to put there, plus the ones you add yourself. So you initially use an empty whitelist and with the dryrun option you specify a file where the serialized objects are listed. Then you can continuously fill your whitelist to keep things secure. You can use the trace option to get a better idea of where and why an object is serialized.

OWASP article (with good references at bottom)

This OWASP article is generic but simple enough to well understand the issue