CVE-2025-0851: Deep Java Library Path Traversal Vulnerability
Summary
CVE-2025-0851: Deep Java Library path traversal issue. Affects ai.djl:api versions < 0.31.1. Fixed in 0.31.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
Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework designed for deep learning. It aims to provide a native Java development experience, making it easy for Java developers to implement deep learning models. DJL includes utilities for extracting model archives in tar and zip formats, which are essential for loading models into the framework. However, these utilities have been found to be vulnerable to path traversal attacks, allowing unauthorized file access during extraction.
Vulnerability Detail
The vulnerability in DJL arises from its untar and unzip functionalities, which do not adequately protect against absolute path traversal. This flaw allows an attacker to craft an archive on one operating system (e.g., Windows) that, when extracted on another (e.g., MacOS or Linux), can write files outside the intended directory. This can lead to unauthorized access to sensitive files or system corruption. The vulnerability affects versions 0.1.0 to 0.31.0, with a CVSS score of 9.8 indicating a critical severity level.
How To Fix
Latest published version: 0.39.0 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.31.1
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using model archive files from untrusted sources. Only utilize model archives from official sources like the DJL Model Zoo or models that you have created and packaged yourself.
Conclusion
The Deep Java Library vulnerability (CVE-2025-0851) poses a significant risk due to its path traversal issue during model archive extraction. Users are strongly advised to update to version 0.31.1 or later to mitigate this risk. Until then, it is crucial to only use trusted model archives to prevent unauthorized access.
See every vulnerability recorded for ai.djl:api →
FAQ
The vulnerability allows for path traversal during the extraction of model archives, potentially leading to unauthorized file access.
Versions 0.1.0 to 0.31.0 of DJL are affected by this vulnerability.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup.
If you cannot update immediately, ensure that you only use model archives from trusted sources to mitigate the risk.
The vulnerability has a CVSS score of 9.8, indicating it is critical and should be addressed promptly.
References
Related vulnerabilities
Recent vulnerabilities recorded for ai.djl:api.