sbt 1.9.6 and earlier: arbitrary file write via IO.unzip in zip/JAR
CVE-2023-46122 Published on October 23, 2023

Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt
sbt is a build tool for Scala, Java, and others. Given a specially crafted zip or JAR file, `IO.unzip` allows writing of arbitrary file. This would have potential to overwrite `/root/.ssh/authorized_keys`. Within sbt's main code, `IO.unzip` is used in `pullRemoteCache` task and `Resolvers.remote`; however many projects use `IO.unzip(...)` directly to implement custom tasks. This vulnerability has been patched in version 1.9.7.

Github Repository NVD

Vulnerability Analysis

CVE-2023-46122 is exploitable with local system access, requires user interaction and a small amount of user privileges. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, with no impact on integrity and availability.

Attack Vector:
LOCAL
Attack Complexity:
LOW
Privileges Required:
LOW
User Interaction:
REQUIRED
Scope:
UNCHANGED
Confidentiality Impact:
NONE
Integrity Impact:
LOW
Availability Impact:
LOW

Weakness Type

What is a Directory traversal Vulnerability?

The software 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 software 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.

CVE-2023-46122 has been classified to as a Directory traversal vulnerability or weakness.


Products Associated with CVE-2023-46122

stack.watch emails you whenever new vulnerabilities are published in Scala Sbt Sbt or Scala Sbt Io. Just hit a watch button to start following.

 
 

Affected Versions

sbt Version >= 0.3.4, < 1.9.7 is affected by CVE-2023-46122

Vulnerable Packages

The following package name and versions may be associated with CVE-2023-46122

Package Manager Vulnerable Package Versions Fixed In
maven org.scala-sbt:sbt >= 0.3.4, < 1.9.7 1.9.7
maven org.scala-sbt:io_2.12 >= 1.0.0, < 1.9.7 1.9.7
maven org.scala-sbt:io_2.13 >= 1.0.0, < 1.9.7 1.9.7
maven org.scala-sbt:io_3 >= 1.0.0, < 1.9.7 1.9.7

Exploit Probability

EPSS
0.03%
Percentile
8.61%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.