Skip to content
Heist/ feed
Back to feed
Low

Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-46122
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 04:44 UTC · Revision 1

Source evidence

Arbitrary file write via archive extraction (Zip Slip) vulnerability in sbt

core-osv · Original source

Published 23 Oct 2023, 15:51 UTC

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.

osv:CVE-2023-46122
Complete source record
{
  "id": "a0e0a0a97288021b9d15ab8c0b4a1514aba12c2ec46f57fab6819deb2efa1611",
  "url": "https://osv.dev/vulnerability/CVE-2023-46122",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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.",
    "evidence": "osv:CVE-2023-46122",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2023-46122",
      "aliases": [
        "CVE-2023-46122",
        "GHSA-h9mw-grgx-2fhf"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/sbt/io",
              "type": "GIT",
              "events": [
                {
                  "introduced": "748d6c0de75b2ea8150666826ef11f1d546975bd"
                },
                {
                  "fixed": "124538348db0713c80793cb57b915f97ec13188a"
                },
                {
                  "introduced": "0"
                },
                {
                  "fixed": "124538348db0713c80793cb57b915f97ec13188a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:scala-sbt:io:*:*:*:*:*:sbt:*:*",
                    "range": [
                      {
                        "introduced": "1.0.0"
                      },
                      {
                        "fixed": "1.9.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:scala-sbt:sbt:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.3.4"
                      },
                      {
                        "fixed": "1.9.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "124538348db0713c80793cb57b915f97ec13188a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.9.1",
            "v1.9.0-RC3",
            "v1.9.0",
            "v1.8.1",
            "v1.9.0-M1",
            "v1.8.0",
            "v1.7.0",
            "v1.6.0-M2",
            "v1.6.0",
            "v1.6.0-M1",
            "v1.5.1",
            "v1.5.0",
            "v1.5.0-M1",
            "v1.4.0",
            "v1.4.0-M8",
            "v1.4.0-M7",
            "v1.4.0-M6",
            "v1.4.0-M5",
            "v1.4.0-M4",
            "v1.4.0-M3",
            "v1.4.0-M2",
            "v1.4.0-M1",
            "v1.3.0-M18",
            "v1.3.0",
            "v1.3.0-M17",
            "v1.3.0-M16",
            "v1.3.0-M15",
            "v1.3.0-M14",
            "v1.3.0-M13",
            "v1.3.0-M12",
            "v1.3.0-M11",
            "v1.3.0-M10",
            "v1.3.0-M9",
            "v1.3.0-M8",
            "v1.3.0-M7",
            "v1.3.0-M6",
            "v1.3.0-M5",
            "v1.3.0-M4",
            "v1.3.0-M3",
            "v1.3.0-M2",
            "v1.3.0-M1",
            "v1.2.0-M2",
            "v1.2.0",
            "v1.2.0-M1",
            "v1.1.0",
            "v1.0.0-M13",
            "v1.0.0-M12",
            "v1.0.0-M11",
            "v1.0.0-M10",
            "v1.0.0-M9",
            "v1.0.0-M8",
            "v1.0.0-M5",
            "v1.0.0-M4"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-46122.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.159545840Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/46xxx/CVE-2023-46122.json",
        "https://github.com/sbt/sbt/security/advisories/GHSA-h9mw-grgx-2fhf",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-46122",
        "https://github.com/sbt/io/issues/358",
        "https://github.com/sbt/io/commit/124538348db0713c80793cb57b915f97ec13188a",
        "https://github.com/sbt/io/pull/360"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/46xxx/CVE-2023-46122.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-46122",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500371,
  "published_at": "2023-10-23T15:51:02.875+00:00"
}