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
- github.com/sbt/io@1245383 commit
- github.com/sbt/io/issues/358 patch
- github.com/sbt/io#360 pull request
- github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf advisory
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
-
github.com
/sbt/io/pull/360
web, patch
-
github.com
/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a
web, patch
-
github.com
/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf
web, exploit, patch, third-party-advisory
-
github.com
/sbt/io/issues/358
web, issue-tracking, patch
-
nvd.nist.gov
/vuln/detail/CVE-2023-46122
advisory
-
github.com
/sbt/sbt
package
Sources
- CVE List CVE-2023-46122
- GitHub Advisory GHSA-h9mw-grgx-2fhf
- NVD CVE-2023-46122
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.