Apache Commons Beanutils Vulnerability: Classloader Access Risk
Summary
CVE-2019-10086: In Apache Commons Beanutils 1.9.2, a special BeanIntrospector class was added which allows suppressing the ability for an attacker to access the classloader via the class property available on all Java objects. Affects commons-beanutils versions < 1.9.4-1. Fixed in 1.9.4-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Apache Commons Beanutils is a Java library that provides utilities for manipulating JavaBeans properties. It allows developers to easily access and modify properties of Java objects, making it a popular choice for applications that require dynamic property manipulation. However, a vulnerability was identified in version 1.9.2, where the default configuration did not utilize a newly introduced BeanIntrospector class designed to prevent unauthorized access to the classloader through Java objects.
Vulnerability Detail
In Apache Commons Beanutils version 1.9.2, a vulnerability exists due to the failure to implement the BeanIntrospector class by default. This oversight allows attackers to exploit the class property available on all Java objects, potentially gaining access to the classloader. This could lead to unauthorized code execution or exposure of sensitive information, posing a significant security risk to applications relying on this library.
How To Fix
Minimum fixed version
1.9.4-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade commons-beanutils
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If an immediate upgrade is not feasible, consider implementing a custom BeanIntrospector that restricts access to the classloader. This can be done by configuring the PropertyUtilsBean to use the custom BeanIntrospector, thereby mitigating the risk until an upgrade can be performed. Example code for a custom BeanIntrospector is not provided here, but it should focus on overriding the default behavior to prevent classloader access.
Conclusion
The vulnerability in Apache Commons Beanutils poses a significant risk due to improper access control to the classloader. Upgrading to version 1.9.4-1 or later is essential to secure applications using this library. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for commons-beanutils →
FAQ
Versions prior to 1.9.4-1 are affected by this vulnerability.
The CVSS score for this vulnerability is 7.3, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
Exploitation of this vulnerability could lead to unauthorized access to the classloader, allowing attackers to execute arbitrary code or access sensitive data.
Yes, implementing a custom BeanIntrospector can help mitigate the risk until an upgrade is possible.
Related vulnerabilities
Recent vulnerabilities recorded for commons-beanutils.