Vulnerabilities in pkg:maven/ai.djl/api

PACKAGE
Advisory Identifier: GHSA-jcrp-x7w3-ffmg
Advisory Summary

CVE-2025-0851 is a CRITICAL (CVSS 9.8) path traversal vulnerability (CWE-36: Absolute Path Traversal) affecting Api libraries in the Maven ecosystem. The issue involves deep java library path traversal issue. Remediation is available by upgrading affected packages to version 0.31.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/ai.djl/api

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/ai.djl/api. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jcrp-x7w3-ffmg CVE-2025-0851 CRITICAL Deep Java Library path traversal issue
GHSA-w877-jfw7-46rj CVE-2024-37902 CRITICAL DeepJavaLibrary API absolute path traversal

CVE-2025-0851 at a Glance

CVE Identifier CVE-2025-0851
GHSA Identifier GHSA-jcrp-x7w3-ffmg
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-36: Absolute Path Traversal
Affected Product Api
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-0851

To remediate this vulnerability, upgrade all affected Api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ai.djl:api fixed: 0.31.1
<dependency>
    <groupId>ai.djl</groupId>
    <artifactId>api</artifactId>
    <version>0.31.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=ai.djl

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-0851, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=ai.djl

Analyze the terminal output to locate any version of Api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.31.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=ai.djl command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-36: Absolute Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory. In Api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary [Deep Java Library (DJL)](https://docs.djl.ai/master/index.html) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is designed to be easy to get started with and simple to use for Java developers. DJL provides a native Java development experience and functions like any other regular Java library. DJL provides utilities for extracting tar and zip model archives that are used when loading models for use with DJL. These utilities were found to contain issues that do not protect against absolute path traversal during the extraction process. ## Impact An issue exists with DJL's untar and unzip functionalities. Specifically, it is possible to create an archive on a Windows system, and when extracted on a MacOS or Linux system, write artifacts outside the intended destination during the extraction process. The reverse is also true for archives created on MacOS/Linux systems and extracted on Windows systems. Impacted versions: 0.1.0 - 0.31.0 ## Patches This issue has been patched in DJL 0.31.1 [1] ## Workarounds Do not use model archive files from sources you do not trust. You should only use model archives from official sources like the DJL Model Zoo, or models that you have created and packaged yourself. ## References If you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. [1] https://github.com/deepjavalibrary/djl/tree/v0.31.1 [2] https://aws.amazon.com/security/vulnerability-reporting

CVE-2025-0851 Affected Api Versions

1 component(s)
Fixed Versions:
0.31.1
Product / Package Ecosystem Affected Versions Fixed Version
ai.djl:api
Maven
< 0.31.1
0.31.1

References

Frequently Asked Questions

What is CVE-2025-0851?
CVE-2025-0851 is a security vulnerability in Api involving Deep Java Library path traversal issue under CWE-36: Absolute Path Traversal.
Which Api versions are affected?
Affected versions include releases prior to 0.31.1 across affected packages: ai.djl:api.
What version fixes CVE-2025-0851?
Upgrading to 0.31.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is api affected?
Yes, ai.djl:api is affected in releases prior to 0.31.1. Upgrade your dependency to 0.31.1 or later.
What is the CVSS score of CVE-2025-0851?
CVE-2025-0851 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-0851?
CVE-2025-0851 is classified under CWE-36: Absolute Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.).
How can I check Maven dependencies for CVE-2025-0851?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ai.djl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jcrp-x7w3-ffmg",
  "modified" : "2025-10-14T21:54:30Z",
  "published" : "2025-01-29T22:21:33Z",
  "aliases" : [ "CVE-2025-0851" ],
  "summary" : "Deep Java Library path traversal issue",
  "details" : "## Summary\n\n[Deep Java Library (DJL)](https://docs.djl.ai/master/index.html) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is designed to be easy to get started with and simple to use for Java developers. DJL provides a native Java development experience and functions like any other regular Java library.\n\nDJL provides utilities for extracting tar and zip model archives that are used when loading models for use with DJL. These utilities were found to contain issues that do not protect against absolute path traversal during the extraction process.\n\n## Impact\n\nAn issue exists with DJL's untar and unzip functionalities. Specifically, it is possible to create an archive on a Windows system, and when extracted on a MacOS or Linux system, write artifacts outside the intended destination during the extraction process. The reverse is also true for archives created on MacOS/Linux systems and extracted on Windows systems.\n\nImpacted versions: 0.1.0 - 0.31.0\n\n## Patches\n\nThis issue has been patched in DJL 0.31.1 [1]\n\n## Workarounds\n\nDo not use model archive files from sources you do not trust. You should only use model archives from official sources like the DJL Model Zoo, or models that you have created and packaged yourself.\n\n## References\n\nIf you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n[1] https://github.com/deepjavalibrary/djl/tree/v0.31.1\n[2] https://aws.amazon.com/security/vulnerability-reporting",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ai.djl:api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.31.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/deepjavalibrary/djl/security/advisories/GHSA-jcrp-x7w3-ffmg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-0851"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/deepjavalibrary/djl/commit/7415cc5f72aae69ea9716a5e4f709af03a77a619"
  }, {
    "type" : "WEB",
    "url" : "https://aws.amazon.com/security/security-bulletins/AWS-2025-003"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/deepjavalibrary/djl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/deepjavalibrary/djl/releases/tag/v0.31.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-36" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-29T22:21:33Z",
    "nvd_published_at" : "2025-01-29T22:15:30Z"
  }
}