CVE-2026-32948: sbt: Source dependency feature (via crafted VCS URL) leads to arbitrary code execution on Windows

Published Mar 24, 2026
·
Updated

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.

Other sources

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.

— MITRE

Affected Software

3 affected componentsFixes available
maven/org.scala-sbt:sbt>=0.9.5<1.12.7
1.12.7
All of the following
Scala.epfl Sbt>=0.9.5<1.12.7
Microsoft Windows

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.scala-sbt:sbt to a version that resolves this vulnerability.

    Fixed in 1.12.7
  2. Upgrade

    Upgrade sbt/sbt to a version that resolves this vulnerability.

    Fixed in 1.12.7

Event History

Mar 24, 2026
Advisory Published
via GitHub·04:04 PM
Data Sourced
via GitHub·04:04 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·06:48 PM
Data Sourced
via MITRE·06:48 PM
DescriptionWeakness
Data Sourced
via OSV·06:48 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeakness
Mar 26, 2026
Data Sourced
via NVD·08:27 PM
RemedyAffected Software
Updated
via NVD·08:27 PM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2026-32948?

CVE-2026-32948 is classified as a high severity vulnerability due to its potential for command injection.

2

How do I fix CVE-2026-32948?

To fix CVE-2026-32948, upgrade to sbt version 1.12.8 or later which addresses the vulnerability.

3

What are the affected versions for CVE-2026-32948?

CVE-2026-32948 affects sbt versions between 0.9.5 and 1.12.7.

4

What types of software are vulnerable to CVE-2026-32948?

CVE-2026-32948 impacts the sbt build tool used for Scala projects on Windows.

5

What is the exploitation impact of CVE-2026-32948?

Exploitation of CVE-2026-32948 could allow an attacker to execute arbitrary commands on the affected system.

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