Where
-Infinity
0

Vendor Risk Score

See how scala.epfl compares to other vendors in security performance

View Risk Score →
Severity
6.7
OS Command Injection
AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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.

Details - Resolvers.scala L84–95 — git resolver passes uri.getFragment() to run() without sanitization - Resolvers.scala L137–145 — run() uses Process("cmd", "/c", ...) on Windows, so cmd interprets && as command separator

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

scala // 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.

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203