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