[MAVEN:GHSA-H9MW-GRGX-2FHF] sbt vulnerable to arbitrary file write via archive extraction (Zip Slip)
Severity
Low
Affected Packages
4
Fixed Packages
4
CVEs
1
Impact
Given specially crafted zip or JAR file, IO.unzip
allows writing of arbitrary file. The follow is an example of a malicious entry:
+2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys
This would have a 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 - https://github.com/search?q=IO.unzip+language%3AScala&type=code&l=Scala&p=1
Patches
The problem has been patched in https://github.com/sbt/io/pull/360
sbt 1.9.7 is available with the fix.
Workarounds
A workaround might be use some other library to unzip.
References
Package | Affected Version |
---|---|
pkg:maven/org.scala-sbt/sbt | >= 0.3.4, < 1.9.7 |
pkg:maven/org.scala-sbt/io_3 | >= 1.0.0, < 1.9.7 |
pkg:maven/org.scala-sbt/io_2.13 | >= 1.0.0, < 1.9.7 |
pkg:maven/org.scala-sbt/io_2.12 | >= 1.0.0, < 1.9.7 |
Package | Fixed Version |
---|---|
pkg:maven/org.scala-sbt/sbt | = 1.9.7 |
pkg:maven/org.scala-sbt/io_3 | = 1.9.7 |
pkg:maven/org.scala-sbt/io_2.13 | = 1.9.7 |
pkg:maven/org.scala-sbt/io_2.12 | = 1.9.7 |
- ID
- MAVEN:GHSA-H9MW-GRGX-2FHF
- Severity
- low
- URL
- https://github.com/advisories/GHSA-h9mw-grgx-2fhf
- Published
-
2023-10-24T01:51:04
(11 months ago) - Modified
-
2023-11-10T05:04:10
(10 months ago) - Rights
- Maven Security Team
- Other Advisories
Type | Package URL | Namespace | Name / Product | Version | Distribution / Platform | Arch | Patch / Fix |
---|---|---|---|---|---|---|---|
Affected | pkg:maven/org.scala-sbt/sbt | org.scala-sbt | sbt | >= 0.3.4 < 1.9.7 | |||
Fixed | pkg:maven/org.scala-sbt/sbt | org.scala-sbt | sbt | = 1.9.7 | |||
Affected | pkg:maven/org.scala-sbt/io_3 | org.scala-sbt | io_3 | >= 1.0.0 < 1.9.7 | |||
Fixed | pkg:maven/org.scala-sbt/io_3 | org.scala-sbt | io_3 | = 1.9.7 | |||
Affected | pkg:maven/org.scala-sbt/io_2.13 | org.scala-sbt | io_2.13 | >= 1.0.0 < 1.9.7 | |||
Fixed | pkg:maven/org.scala-sbt/io_2.13 | org.scala-sbt | io_2.13 | = 1.9.7 | |||
Affected | pkg:maven/org.scala-sbt/io_2.12 | org.scala-sbt | io_2.12 | >= 1.0.0 < 1.9.7 | |||
Fixed | pkg:maven/org.scala-sbt/io_2.12 | org.scala-sbt | io_2.12 | = 1.9.7 |
# CVE | Description | CVSS | EPSS | EPSS Trend (30 days) | Affected Products | Weaknesses | Security Advisories | Exploits | PoC | Pubblication Date | Modification Date |
---|---|---|---|---|---|---|---|---|---|---|---|
# CVE | Description | CVSS | EPSS | EPSS Trend (30 days) | Affected Products | Weaknesses | Security Advisories | PoC | Pubblication Date | Modification Date |