Absolute Path Traversal Affecting ai.djl:api package, versions [,0.31.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-AIDJL-8679263
  • published31 Jan 2025
  • disclosed29 Jan 2025
  • creditUnknown

Introduced: 29 Jan 2025

NewCVE-2025-0851  (opens in a new tab)
CWE-36  (opens in a new tab)

How to fix?

Upgrade ai.djl:api to version 0.31.1 or higher.

Overview

Affected versions of this package are vulnerable to Absolute Path Traversal via the ZipUtils.unzip and TarUtils.untar functionalities. An attacker could gain SSH access by injecting an SSH key into the authorized_keys file, or upload HTML files to leverage cross-site scripting issues. 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.

Workaround

This can be mitigated by not using model archive files from untrusted sources.

CVSS Scores

version 4.0
version 3.1