Skip to content
Fencer Vulns
low 3.9

CVE-2023-46122 json

Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt

published 2023-10-23 3 y ago modified 2026-06-17 4 mo ago also GHSA-h9mw-grgx-2fhf , EUVD-2023-2746

cvss
3.9
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 31%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.scala-sbt:sbt 1.9.7
  • maven org.scala-sbt:io_2.12 1.9.7
  • maven org.scala-sbt:io_2.13 1.9.7
  • maven org.scala-sbt:io_3 1.9.7
  • scala-sbt io 1.9.7
  • scala-sbt sbt 1.9.7
  • xmvn SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 4.2.0-150200.3.14.1
  • sbt SLE Module for Package Hub 15 SP5, openSUSE Leap 15.5, openSUSE Leap 15.4 0.13.18-150200.4.16.1
  • maven SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 3.9.4-150200.4.18.1
  • xmvn-mojo SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 4.2.0-150200.3.14.1
  • xmvn-tools SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 4.2.0-150200.3.14.1
  • xmvn-parent openSUSE Leap 15.5, openSUSE Leap 15.4 4.2.0-150200.3.14.1
  • sbt-bootstrap SLE Module for Package Hub 15 SP5, openSUSE Leap 15.5, openSUSE Leap 15.4 0.13.18-150200.4.16.1
  • maven-resolver SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 1.9.15-150200.3.14.2

suse advisories SUSE-SU-2023:4527-1

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

0.37% chance of exploitation in the next 30 days, higher than 31% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 3.9 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
NVD 3.1 7.1 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
GitHub 3.1 3.9 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L

Affected packages

ecosystem package affected 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

Affected products

  • sbt sbt

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.