Junglewise Threat Intelligence

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

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

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

Executive brief

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.

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

Timeline

  • 2023-06-21: disclosed: Advisory published

References

Related threats