{"id":"CVE-2023-46122","aliases":["GHSA-h9mw-grgx-2fhf"],"url":"https://o3.security/vulnerability/CVE-2023-46122","summary":"Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt","details":"### Impact\n\nGiven specially crafted zip or JAR file, `IO.unzip` allows writing of arbitrary file. The follow is an example of a malicious entry:\n\n```\n+2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys\n```\n\nThis 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\n\n### Patches\n\nThe problem has been patched in https://github.com/sbt/io/pull/360\nsbt 1.9.7 is available with the fix.\n\n### Workarounds\nA workaround might be use some other library to unzip.\n\n### References\n\n- https://github.com/snyk/zip-slip-vulnerability\n- https://security.snyk.io/vuln/SNYK-JAVA-ORGCODEHAUSPLEXUS-31680\n- https://github.com/sbt/io/issues/358","published":"2023-10-23T15:51:02.875Z","modified":"2026-08-12T03:51:15.173315789Z","cvss":{"score":3.9,"severity":"LOW","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L"},"epss":{"score":0.0034,"percentile":0.27117,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Maven","name":"org.scala-sbt:sbt","fixedVersion":"1.9.7"},{"ecosystem":"Maven","name":"org.scala-sbt:io_2.12","fixedVersion":"1.9.7"},{"ecosystem":"Maven","name":"org.scala-sbt:io_2.13","fixedVersion":"1.9.7"},{"ecosystem":"Maven","name":"org.scala-sbt:io_3","fixedVersion":"1.9.7"}],"fix":{"url":"https://github.com/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a","label":"sbt/io@1245383"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/46xxx/CVE-2023-46122.json"},{"type":"ADVISORY","url":"https://github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46122"},{"type":"REPORT","url":"https://github.com/sbt/io/issues/358"},{"type":"FIX","url":"https://github.com/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a"},{"type":"FIX","url":"https://github.com/sbt/io/pull/360"},{"type":"PACKAGE","url":"https://github.com/sbt/sbt"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:15.173315789Z"}}