CVE-2023-46122
Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt
Also known as GHSA-h9mw-grgx-2fhf
Mitigation
- Upgrade org.scala-sbt:sbt to 1.9.7 or later.
- Upgrade org.scala-sbt:io_2.12 to 1.9.7 or later.
- Upgrade org.scala-sbt:io_2.13 to 1.9.7 or later.
- Upgrade org.scala-sbt:io_3 to 1.9.7 or later.
Who should check
- Projects that depend on Maven package org.scala-sbt:sbt (>= 0.3.4, < 1.9.7)
- Projects that depend on Maven package org.scala-sbt:io_2.12 (>= 1.0.0, < 1.9.7)
- Projects that depend on Maven package org.scala-sbt:io_2.13 (>= 1.0.0, < 1.9.7)
- Projects that depend on Maven package org.scala-sbt:io_3 (>= 1.0.0, < 1.9.7)
- Anyone running sbt >= 0.3.4, < 1.9.7
Vulnerability facts
- Affected
- org.scala-sbt:sbt >= 0.3.4, < 1.9.7; org.scala-sbt:io_2.12 >= 1.0.0, < 1.9.7; org.scala-sbt:io_2.13 >= 1.0.0, < 1.9.7; org.scala-sbt:io_3 >= 1.0.0, < 1.9.7
- Fixed in
- 1.9.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 3.9 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 0.36% chance of exploitation in 30 days (percentile 22, 2026-11-26)
- CWE
- CWE-22
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.scala-sbt:sbt | >= 0.3.4, < 1.9.7 | 1.9.7 | osv |
| Maven org.scala-sbt:io_2.12 | >= 1.0.0, < 1.9.7 | 1.9.7 | osv |
| Maven org.scala-sbt:io_2.13 | >= 1.0.0, < 1.9.7 | 1.9.7 | osv |
| Maven org.scala-sbt:io_3 | >= 1.0.0, < 1.9.7 | 1.9.7 | osv |
| sbt | >= 0.3.4, < 1.9.7 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-46122. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-46122.md Affected: org.scala-sbt:sbt >= 0.3.4, < 1.9.7; org.scala-sbt:io_2.12 >= 1.0.0, < 1.9.7; org.scala-sbt:io_2.13 >= 1.0.0, < 1.9.7; org.scala-sbt:io_3 >= 1.0.0, < 1.9.7 Fixed in: 1.9.7 Steps: 1. Search this machine and project for org.scala-sbt:sbt (Maven), org.scala-sbt:io_2.12 (Maven), org.scala-sbt:io_2.13 (Maven), org.scala-sbt:io_3 (Maven), sbt: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2023-46122 being exploited?
There is no confirmed exploitation: CVE-2023-46122 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.36% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-46122?
Low: CVSS 3.9 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2023-46122?
org.scala-sbt:sbt >= 0.3.4, < 1.9.7; org.scala-sbt:io_2.12 >= 1.0.0, < 1.9.7; org.scala-sbt:io_2.13 >= 1.0.0, < 1.9.7; org.scala-sbt:io_3 >= 1.0.0, < 1.9.7.
Is there a fix for CVE-2023-46122?
Yes. Fixed in 1.9.7. Upgrade org.scala-sbt:sbt to 1.9.7 or later. Upgrade org.scala-sbt:io_2.12 to 1.9.7 or later. Upgrade org.scala-sbt:io_2.13 to 1.9.7 or later. Upgrade org.scala-sbt:io_3 to 1.9.7 or later.
How do I check if I'm affected by CVE-2023-46122?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.