CVE-2023-46122Arbitrary 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.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.scala-sbt:io_2.12 | Fixed | 1.9.7 | GHSA-h9mw-grgx-2fhf |
| Maven library | org.scala-sbt:io_2.13 | Fixed | 1.9.7 | GHSA-h9mw-grgx-2fhf |
| Maven library | org.scala-sbt:io_3 | Fixed | 1.9.7 | GHSA-h9mw-grgx-2fhf |
| Maven library | org.scala-sbt:sbt | Fixed | 1.9.7 | GHSA-h9mw-grgx-2fhf |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sbt: affected: >= 0.3.4, < 1.9.7
References
- https://github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf
- https://github.com/sbt/io/issues/358
- https://github.com/sbt/io/pull/360
- https://github.com/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.