About SecurityFor information about reporting or asking questions about security, please see Apache Commons Security . This page lists all security vulnerabilities fixed in released versions of this component. Please note that binary patches are never provided. If you need to apply a source code patch, use the building instructions for the component version that you are using. If you need help on building this component or other help on following the instructions to mitigate the known vulnerabilities listed here, please send your questions to the public user mailing list . If you have encountered an unlisted security vulnerability or other unexpected behavior that has security impact, or if the descriptions here are incomplete, please report them privately to the Apache Security Team. Thank you. Security VulnerabilitiesCVE-2019-10086
Example: /** * Example displaying the new default behavior such that * it is not possible to access class level properties utilizing the * BeanUtilsBean, which in turn utilizes the PropertyUtilsBean. */ public void testSuppressClassPropertyByDefault() throws Exception { final BeanUtilsBean bub = new BeanUtilsBean(); final AlphaBean bean = new AlphaBean(); try { bub.getProperty(bean, "class"); fail("Could access class property!"); } catch (final NoSuchMethodException ex) { // ok } } /** * Example showing how by which one would use to revert to the * behaviour prior to the 1.9.4 release where class level properties were accessible by * the BeanUtilsBean and the PropertyUtilsBean. */ public void testAllowAccessToClassProperty() throws Exception { final BeanUtilsBean bub = new BeanUtilsBean(); bub.getPropertyUtils().removeBeanIntrospector(SuppressPropertiesBeanIntrospector.SUPPRESS_CLASS); final AlphaBean bean = new AlphaBean(); String result = bub.getProperty(bean, "class"); assertEquals("Class property should have been accessed", "class org.apache.commons.beanutils2.AlphaBean", result); } References:
|