CVE-2023-35926: Backstage Scaffolder plugin insecure sandbox in code execution

CVE-2023-35926 · Severity: low · CVSS 3.1 · Published 2023-06-21

The Backstage Scaffolder plugin is a tool that enables teams to automate the creation of new software projects and components through templated workflows. An attacker with write access to scaffolder templates could inject malicious code that executes with full privileges on the backend server, potentially compromising the entire orchestration infrastructure and any systems it manages.

Technologies: Backstage Scaffolder Backend Plugin, @backstage/plugin-scaffolder-backend (npm). Vendors: Backstage, npm.

Quick answers

Is CVE-2023-35926 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-35926 being exploited in the wild.
How severe is CVE-2023-35926?
Low severity, with a CVSS score of 3.1, published 21 June 2023.
Which products and versions are affected?
Backstage Scaffolder Backend Plugin < 1.15.0; @backstage/plugin-scaffolder-backend (npm) SEMVER:introduced=0,fixed=1.15.0.
Is there a fix for CVE-2023-35926?
Yes. @backstage/plugin-scaffolder-backend (npm): upgrade to 1.15.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-35926 attacked?
It is attacked over the network.
Am I affected by CVE-2023-35926?
Check whether you run Backstage Scaffolder Backend Plugin or @backstage/plugin-scaffolder-backend (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @backstage/plugin-scaffolder-backend (npm): upgrade to 1.15.0 or later
    npm install @backstage/plugin-scaffolder-backend@1.15.0

Technical details

The vulnerability is a code injection issue (CWE-94) in the Backstage scaffolder-backend plugin's sandbox implementation. The plugin uses a templating library that inherently allows code injection and relies on a sandbox (vm2) to safely execute templates. The sandbox implementation is insufficient, allowing a malicious actor with write access to scaffolder template YAML definitions to break out of the sandbox and achieve remote code execution. The attack requires high privileges (write access to templates) and cannot be exploited through user input data alone. The vulnerability is fixed in version 1.15.0 of @backstage/plugin-scaffolder-backend, which replaces the insecure vm2 sandbox with a more robust sandbox library.

Affected products

  • Backstage scaffolder-backend plugin < 1.15.0

Identifiers

  • CVE-2023-35926
  • GHSA-wg6p-jmpc-xjmr

Timeline

  • 2023-06-21: disclosed: Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.