CVE-2024-37902: Api Path Traversal Vulnerability
CRITICALCVE-2024-37902 is a CRITICAL (CVSS 10.0) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Api libraries in the Maven ecosystem. The issue involves deepjavalibrary api absolute path traversal. Remediation is available by upgrading affected packages to version 0.28.0.
CVE-2024-37902 at a Glance
Security Impact
CVSS: 10.0
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:C/C:H/I:H/A:H).
How to Fix CVE-2024-37902
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.
<dependency>
<groupId>ai.djl</groupId>
<artifactId>api</artifactId>
<version>0.28.0</version>
</dependency>
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-2024-37902, 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.28.0), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted 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
CVE-2024-37902 Affected Api Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ai.djl:api
|
Maven |
≥ 0.1.0
< 0.28.0
|
0.28.0
|
References
Frequently Asked Questions
What is CVE-2024-37902?
Which Api versions are affected?
What version fixes CVE-2024-37902?
Is api affected?
What is the CVSS score of CVE-2024-37902?
What CWE is associated with CVE-2024-37902?
How can I check Maven dependencies for CVE-2024-37902?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w877-jfw7-46rj",
"modified" : "2024-06-18T15:24:00Z",
"published" : "2024-06-17T21:20:44Z",
"aliases" : [ "CVE-2024-37902" ],
"summary" : "DeepJavaLibrary API absolute path traversal",
"details" : "## Summary\n\nDeepJavaLibrary(DJL) versions 0.1.0 through 0.27.0 do not prevent absolute path archived artifacts from inserting archived files directly into the system, overwriting system files. This is fixed in DJL 0.28.0 and patched in DJL Large Model Inference containers 0.27.0.\n\n**Impacted versions: 0.1.0 through 0.27.0**\n\n## Patches\n\nPatched Deep Learning Containers:\n[v1.1-djl-0.27.0-inf-cpu-full](https://github.com/aws/deep-learning-containers/releases/tag/v1.1-djl-0.27.0-inf-cpu-full)\n[v1.4-djl-0.27.0-inf-ds-0.12.6](https://github.com/aws/deep-learning-containers/releases/tag/v1.4-djl-0.27.0-inf-ds-0.12.6)\n[v1.4-djl-0.27.0-inf-trt-0.8.0](https://github.com/aws/deep-learning-containers/releases/tag/v1.4-djl-0.27.0-inf-trt-0.8.0)\n[v1.3-djl-0.27.0-inf-neuronx-sdk2.18.1](https://github.com/aws/deep-learning-containers/releases/tag/v1.3-djl-0.27.0-inf-neuronx-sdk2.18.1)\n\nPatched Library:\n[v0.28.0](https://github.com/deepjavalibrary/djl/releases/tag/v0.28.0)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "ai.djl:api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "0.28.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/deepjavalibrary/djl/security/advisories/GHSA-w877-jfw7-46rj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37902"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/deep-learning-containers/releases/tag/v1.1-djl-0.27.0-inf-cpu-full"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/deep-learning-containers/releases/tag/v1.3-djl-0.27.0-inf-neuronx-sdk2.18.1"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/deep-learning-containers/releases/tag/v1.4-djl-0.27.0-inf-ds-0.12.6"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/deep-learning-containers/releases/tag/v1.4-djl-0.27.0-inf-trt-0.8.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/deepjavalibrary/djl"
}, {
"type" : "WEB",
"url" : "https://github.com/deepjavalibrary/djl/releases/tag/v0.28.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-17T21:20:44Z",
"nvd_published_at" : "2024-06-17T20:15:14Z"
}
}