JavaBeans can have their properties or nested properties set by population functions. An attacker can leverage this feature to push into the JavaBean malicious data that can compromise the software integrity. A typical attack will try to manipulate the ClassLoader and finally execute malicious code.
This rule raises an issue when:
* BeanUtils.populate(...) or BeanUtilsBean.populate(...) from http://commons.apache.org/proper/commons-beanutils/[Apache Commons BeanUtils] are called
* BeanUtils.setProperty(...) or BeanUtilsBean.setProperty(...) from http://commons.apache.org/proper/commons-beanutils/[Apache Commons BeanUtils] are called
* org.springframework.beans.BeanWrapper.setPropertyValue(...) or org.springframework.beans.BeanWrapper.setPropertyValues(...) from Spring is called
Don't set any sensitive properties. Keep full control over which properties are set. If the property names are provided by an unstrusted source, filter them with a whitelist.