Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-h9mw-grgx-2fhf

Опубликовано: 24 окт. 2023
Источник: github
Github: Прошло ревью
CVSS3: 3.9

Описание

sbt vulnerable to arbitrary file write via archive extraction (Zip Slip)

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

Пакеты

Наименование

org.scala-sbt:sbt

maven
Затронутые версииВерсия исправления

>= 0.3.4, < 1.9.7

1.9.7

Наименование

org.scala-sbt:io_2.12

maven
Затронутые версииВерсия исправления

>= 1.0.0, < 1.9.7

1.9.7

Наименование

org.scala-sbt:io_2.13

maven
Затронутые версииВерсия исправления

>= 1.0.0, < 1.9.7

1.9.7

Наименование

org.scala-sbt:io_3

maven
Затронутые версииВерсия исправления

>= 1.0.0, < 1.9.7

1.9.7

EPSS

Процентиль: 8%
0.00029
Низкий

3.9 Low

CVSS3

Дефекты

CWE-22

Связанные уязвимости

CVSS3: 3.9
nvd
больше 2 лет назад

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.

suse-cvrf
около 2 лет назад

Security update for maven, maven-resolver, sbt, xmvn

EPSS

Процентиль: 8%
0.00029
Низкий

3.9 Low

CVSS3

Дефекты

CWE-22