{"id":"CVE-2023-46122","aliases":["CVE-2023-46122","GHSA-h9mw-grgx-2fhf"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"sbt es una herramienta de compilación para Scala, Java y otros. Dado un archivo zip o JAR especialmente manipulado, `IO.unzip` permite escribir archivos arbitrarios. Esto tendría potencial para sobrescribir `/root/.ssh/authorized_keys`. Dentro del código principal de sbt, `IO.unzip` se usa en la tarea `pullRemoteCache` y `Resolvers.remote`; sin embargo, muchos proyectos utilizan `IO.unzip(...)` directamente para implementar tareas personalizadas. Esta vulnerabilidad ha sido parcheada en la versión 1.9.7.","source":"nvd"}],"published":"2023-10-23T15:51:02.875Z","modified":"2026-06-17T06:30:11.763Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":3.9,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 0.3.4, < 1.9.7","status":"affected"}],"vendor":"sbt","product":"sbt","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"1.9.7"}],"ecosystem":"Maven","package":"org.scala-sbt:sbt","purl":"pkg:maven/org.scala-sbt/sbt","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.9.7"}],"ecosystem":"Maven","package":"org.scala-sbt:io_2.12","purl":"pkg:maven/org.scala-sbt/io_2.12","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.9.7"}],"ecosystem":"Maven","package":"org.scala-sbt:io_2.13","purl":"pkg:maven/org.scala-sbt/io_2.13","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.9.7"}],"ecosystem":"Maven","package":"org.scala-sbt:io_3","purl":"pkg:maven/org.scala-sbt/io_3","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.0","fixed":"1.9.7"}],"vendor":"scala-sbt","product":"io","cpe":"cpe:2.3:a:scala-sbt:io:*:*:*:*:*:sbt:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"0.3.4","fixed":"1.9.7"}],"vendor":"scala-sbt","product":"sbt","cpe":"cpe:2.3:a:scala-sbt:sbt:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/io/issues/358","tags":["issue-tracking","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/io/pull/360","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46122","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sbt/sbt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-09-11T20:11:11.780Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-46122","url":"https://www.cve.org/CVERecord?id=CVE-2023-46122","licence":"CVE Terms of Use","modified":"2024-09-17T13:45:20.258Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h9mw-grgx-2fhf","url":"https://github.com/advisories/GHSA-h9mw-grgx-2fhf","licence":"CC-BY-4.0","modified":"2024-02-16T08:15:38.939Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-46122","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46122","licence":"Public domain","modified":"2026-06-17T06:30:11.763Z"}],"updatedAt":"2026-11-25T22:58:29.021Z","epss":{"score":0.00369,"percentile":0.32817,"date":"2026-12-01T12:00:22.000Z"}}