CVE-2023-46122

CVE-2023-46122 is a low-severity path traversal vulnerability in org.scala-sbt:sbt (maven), affecting versions >= 0.3.4, < 1.9.7. It is fixed in 1.9.7.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

sbt vulnerable to arbitrary file write via archive extraction (Zip Slip)

Workarounds

A workaround might be use some other library to unzip.

References

Impact

Given specially crafted zip or JAR file, IO.unzip allows writing of arbitrary file. The follow is an example of a malicious entry:

+2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys

This 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

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

CVE-2023-46122 has a CVSS score of 3.9 (Low). The vector is requires local access, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.9.7); upgrading removes the vulnerable code path.

Affected versions

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)

Security releases

org.scala-sbt:sbt → 1.9.7 (maven) org.scala-sbt:io_2.12 → 1.9.7 (maven) org.scala-sbt:io_2.13 → 1.9.7 (maven) org.scala-sbt:io_3 → 1.9.7 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The problem has been patched in https://github.com/sbt/io/pull/360
sbt 1.9.7 is available with the fix.

Frequently Asked Questions

  1. What is CVE-2023-46122? CVE-2023-46122 is a low-severity path traversal vulnerability in org.scala-sbt:sbt (maven), affecting versions >= 0.3.4, < 1.9.7. It is fixed in 1.9.7. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is CVE-2023-46122? CVE-2023-46122 has a CVSS score of 3.9 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2023-46122?
    • org.scala-sbt:sbt (maven) (versions >= 0.3.4, < 1.9.7)
    • org.scala-sbt:io_2.12 (maven) (versions >= 1.0.0, < 1.9.7)
    • org.scala-sbt:io_2.13 (maven) (versions >= 1.0.0, < 1.9.7)
    • org.scala-sbt:io_3 (maven) (versions >= 1.0.0, < 1.9.7)
  4. Is there a fix for CVE-2023-46122? Yes. CVE-2023-46122 is fixed in 1.9.7. Upgrade to this version or later.
  5. Is CVE-2023-46122 exploitable, and should I be worried? Whether CVE-2023-46122 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2023-46122 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2023-46122?
    • 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

Other vulnerabilities in org.scala-sbt:sbt

Stop the waste.
Protect your environment with Kodem.