CVE-2025-48734 Overview
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.
Critical Impact
Allows remote code execution through improper access to Java class loader.
Affected Products
- Apache Commons BeanUtils 1.x before 1.11.0
- Apache Commons BeanUtils 2.x before 2.0.0-M2
Discovery Timeline
- Not Available - Vulnerability discovered by Not Available
- Not Available - Responsible disclosure to Apache
- Not Available - CVE CVE-2025-48734 assigned
- Not Available - Apache releases security patch
- 2025-05-28 - CVE CVE-2025-48734 published to NVD
- 2025-11-03 - Last updated in NVD database
Technical Details for CVE-2025-48734
Vulnerability Analysis
The vulnerability arises from the improper access control in handling the declaredClass property within Apache Commons BeanUtils. By crafting malicious property paths, attackers can execute arbitrary code by hijacking the enum class loader.
Root Cause
The root cause lies in the default behavior of PropertyUtilsBean, which allowed access to the declaredClass property without appropriate restrictions.
Attack Vector
The vulnerability can be exploited over the network, requiring only the ability to pass crafted property paths to the vulnerable application.
// Example exploitation code (sanitized)
String maliciousPath = "enumObject.declaredClass";
Object result = PropertyUtilsBean.getProperty(targetObject, maliciousPath);
Detection Methods for CVE-2025-48734
Indicators of Compromise
- Unusual access patterns to declaredClass properties
- Unexpected behavior in Java applications using BeanUtils
- Logs showing property access to enum loaders
Detection Strategies
Implement logging to capture property path access and monitor for attempts to access declaredClass. SentinelOne's endpoint detection capabilities can help identify abnormal behavior associated with this vulnerability.
Monitoring Recommendations
Regularly review access logs for signs of exploitation attempts targeting enum property paths. Configure SIEM systems to alert on suspicious property access patterns.
How to Mitigate CVE-2025-48734
Immediate Actions Required
- Audit applications using BeanUtils for improper property path handling
- Disable access to declaredClass property paths
- Apply patches immediately
Patch Information
Upgrade to Apache Commons BeanUtils version 1.11.0 or 2.0.0-M2 to apply fixes for this vulnerability.
Workarounds
Until patches can be applied, consider restricting property paths to trusted sources only or implementing input validation to prevent malicious inputs.
// Configuration example
beanIntrospector = new SuppressPropertiesBeanIntrospector("declaredClass");
beanUtilsBean.getPropertyUtils().addBeanIntrospector(beanIntrospector);
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

