REDHAT-BUG-2368956: High severity Apache Commons Beanutils vulnerability
Improper Access Control vulnerability in Apache Commons.
A special BeanIntrospector class was added in version 1.9.2. This can be used to stop attackers from using the declared class property of Java enum objects to get access to the classloader. However this protection was not enabled by default. PropertyUtilsBean (and consequently BeanUtilsBean) now disallows declared class level property access by default.
Releases 1.11.0 and 2.0.0-M2 address a potential security issue when accessing enum properties in an uncontrolled way. If an application using Commons BeanUtils passes property paths from an external source directly to the getProperty() method of PropertyUtilsBean, an attacker can access the enum’s class loader via the “declaredClass” property available on all Java “enum” objects. Accessing the enum’s “declaredClass” allows remote attackers to access the ClassLoader and execute arbitrary code. The same issue exists with PropertyUtilsBean.getNestedProperty(). Starting in versions 1.11.0 and 2.0.0-M2 a special BeanIntrospector suppresses the “declaredClass” property. Note that this new BeanIntrospector is enabled by default, but you can disable it to regain the old behavior; see section 2.5 of the user's guide and the unit tests.
This issue affects Apache Commons BeanUtils 1.x before 1.11.0, and 2.x before 2.0.0-M2.Users of the artifact commons-beanutils:commons-beanutils
1.x are recommended to upgrade to version 1.11.0, which fixes the issue.
Users of the artifact org.apache.commons:commons-beanutils2
2.x are recommended to upgrade to version 2.0.0-M2, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
org.apache.commons:commons-beanutilsto a version that resolves this vulnerability.Fixed in 1.11.0 - Upgrade
Upgrade
org.apache.commons:commons-beanutils2to a version that resolves this vulnerability.Fixed in 2.0.0-M2 - Configuration
Ensure the special BeanIntrospector that suppresses the enum "declaredClass" property is enabled (it is enabled by default starting in versions 1.11.0 and 2.0.0-M2; disablement to regain old behavior is described as optional in the user guide/unit tests, but should not be used for remediation).
Apache Commons BeanUtils / PropertyUtilsBean BeanIntrospector (suppresses enum "declaredClass" property) = enabled
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2368956?
The severity of REDHAT-BUG-2368956 is considered high due to potential unauthorized access to classloader through improper access control.
How do I fix REDHAT-BUG-2368956?
To fix REDHAT-BUG-2368956, upgrade Apache Commons BeanUtils to version 1.11.0 or later, or 2.0.0-M2 or later.
Which versions are affected by REDHAT-BUG-2368956?
Versions of Apache Commons BeanUtils prior to 1.11.0 and 2.0.0-M2 are affected by REDHAT-BUG-2368956.
What is the nature of the vulnerability in REDHAT-BUG-2368956?
REDHAT-BUG-2368956 involves improper access control that may allow attackers to exploit classloader access through Java enum properties.
Is there a workaround for REDHAT-BUG-2368956 before applying a fix?
There is no official workaround for REDHAT-BUG-2368956; upgrading to the fixed version is necessary for mitigation.