Security Exception in Apache POI: Vulnerability in java.util.Arrays.copyOfRange
Summary
OSV-2024-1423: Security exception in java.base/java.util.Arrays.copyOfRange. Affects apache-poi versions >= c488cae3f3536253d0bd2c7580f08193dd70b2da. No fix is published. 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 POI is a widely used Java library for reading and writing Microsoft Office file formats. It allows developers to manipulate Excel, Word, and PowerPoint files programmatically. The library is essential for applications that require document generation or data extraction from Office files. However, it has been found to have a security vulnerability related to the java.util.Arrays.copyOfRange method, which can lead to security exceptions during execution.
Vulnerability Detail
The vulnerability originates from a security exception triggered in the java.base/java.util.Arrays.copyOfRange method. This issue was reported through OSS-Fuzz, indicating that it can cause crashes when certain methods are invoked. Specifically, the crash state involves the org.apache.poi.util.IOUtils.safelyClone method and the org.apache.poi.ddf.EscherBlipRecord.setPictureData method. If exploited, this vulnerability could lead to application crashes and potential data loss, affecting the reliability of applications that depend on Apache POI.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, you can avoid using the affected methods until the library is updated. Review your code to ensure that the java.util.Arrays.copyOfRange method is not called in a way that could trigger the security exception.
Conclusion
In summary, the security exception vulnerability in Apache POI related to the java.util.Arrays.copyOfRange method poses risks to applications that utilize this library. It is crucial to update to the latest version to ensure the security and stability of your applications.
See every vulnerability recorded for apache-poi →
FAQ
The vulnerability is a security exception that occurs in the java.util.Arrays.copyOfRange method, which can lead to application crashes.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If exploited, this vulnerability can cause application crashes and may lead to data loss, affecting the overall reliability of applications using Apache POI.
Yes, a patched version of Apache POI is available. It is recommended to update to the latest version to mitigate the vulnerability.
Update the Apache POI library to the latest version and review your code to avoid using the affected methods until the update is applied.
References
Related vulnerabilities
Recent vulnerabilities recorded for apache-poi.