{"id":"CVE-2026-32948","aliases":["CVE-2026-32948","GHSA-x4ff-q6h8-v7gw"],"related":[],"kind":"vulnerability","state":"published","title":"sbt: Source dependency feature (via crafted VCS URL) leads to arbitrary code execution on Windows","summary":"sbt is a build tool for Scala, Java, and others. From version 0.9.5 to before version 1.12.7, on Windows, sbt uses Process(\"cmd\", \"/c\", ...) to run VCS commands (git, hg, svn). The URI fragment (branch, tag, revision) is user-controlled via the build definition and passed to these commands without validation. Because cmd /c interprets &, |, and ; as command separators, a malicious fragment can execute arbitrary commands. This issue has been patched in version 1.12.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"sbt is a build tool for Scala, Java, and others. From version 0.9.5 to before version 1.12.7, on Windows, sbt uses Process(\"cmd\", \"/c\", ...) to run VCS commands (git, hg, svn). The URI fragment (branch, tag, revision) is user-controlled via the build definition and passed to these commands without validation. Because cmd /c interprets &, |, and ; as command separators, a malicious fragment can execute arbitrary commands. This issue has been patched in version 1.12.7.","source":"cvelist"},{"lang":"en","text":"### Summary\nOn Windows, sbt uses `Process(\"cmd\", \"/c\", ...)` to run VCS commands (git, hg, svn). The URI fragment (branch, tag, revision) is user-controlled via the build definition and passed to these commands without validation. Because `cmd /c` interprets `&`, `|`, and `;` as command separators, a malicious fragment can execute arbitrary commands.\n\n### Patched version\n\nTechnically, sbt 1.12.7 is patched, but it has a bug that makes source dependency non-functional, so update to **sbt 1.12.8** or later instead.\n\n### Details\n- [Resolvers.scala L84–95](https://github.com/sbt/sbt/blob/dc90f160dfb563f46fd1a7b97945c381d15e2a6c/main/src/main/scala/sbt/Resolvers.scala#L84-L95) — git resolver passes `uri.getFragment()` to `run()` without sanitization\n- [Resolvers.scala L137–145](https://github.com/sbt/sbt/blob/dc90f160dfb563f46fd1a7b97945c381d15e2a6c/main/src/main/scala/sbt/Resolvers.scala#L137-L145) — `run()` uses `Process(\"cmd\", \"/c\", ...)` on Windows, so `cmd` interprets `&&` as command separator\n\n### PoC\n```sh\n# build.properties\n# sbt.version=1.12.5  # Tested on those two versions of sbt\nsbt.version=2.0.0-RC9\n```\n\n```scala\n// build.sbt\n\nThisBuild / scalaVersion := \"2.12.19\"\n\nlazy val root = project\n  .in(file(\".\"))\n  .dependsOn(vulnerable)\n\nlazy val vulnerable = RootProject(\n  uri(\"https://github.com/sbt/io.git#develop%26%26calc.exe\")\n)\n```\n\n### Impact\n\nWindows users are impacted. An attacker can execute arbitrary Windows commands if they control the dependency URI.","format":"markdown","source":"ghsa"},{"lang":"es","text":"sbt es una herramienta de construcción para Scala, Java y otros. Desde la versión 0.9.5 hasta antes de la versión 1.12.7, en Windows, sbt utiliza Process(cmd, /c, ...) para ejecutar comandos VCS (git, hg, svn). El fragmento URI (rama, etiqueta, revisión) es controlado por el usuario a través de la definición de construcción y se pasa a estos comandos sin validación. Debido a que cmd /c interpreta &amp;, |, y ; como separadores de comandos, un fragmento malicioso puede ejecutar comandos arbitrarios. Este problema ha sido parcheado en la versión 1.12.7.","source":"nvd"}],"published":"2026-03-24T16:04:12.000Z","modified":"2026-06-17T10:36:37.110Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":6.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":6.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":">= 0.9.5, < 1.12.7","status":"affected"}],"vendor":"sbt","product":"sbt","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.9.5","status":"affected","fixed":"1.12.8"}],"ecosystem":"Maven","package":"org.scala-sbt:sbt","purl":"pkg:maven/org.scala-sbt/sbt","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.9.5","fixed":"1.12.7"}],"vendor":"scala.epfl","product":"sbt","cpe":"cpe:2.3:a:scala.epfl:sbt:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/sbt/sbt/security/advisories/GHSA-x4ff-q6h8-v7gw","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/sbt/commit/1ce945b6b79cbe3cef6c0fe9efbbd2904e0f479e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/sbt/commit/3a474ab060df4dbfa825a7e7bc97e00056519800","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sbt/sbt/releases/tag/v1.12.7","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32948","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sbt/sbt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-03-26T03:55:37.968Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32948","url":"https://www.cve.org/CVERecord?id=CVE-2026-32948","licence":"CVE Terms of Use","modified":"2026-03-26T13:21:23.354Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x4ff-q6h8-v7gw","url":"https://github.com/advisories/GHSA-x4ff-q6h8-v7gw","licence":"CC-BY-4.0","modified":"2026-03-27T22:05:00.945Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32948","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32948","licence":"Public domain","modified":"2026-06-17T10:36:37.110Z"}],"updatedAt":"2026-11-25T22:59:16.603Z","epss":{"score":0.00347,"percentile":0.30261,"date":"2026-12-01T12:00:22.000Z"}}