CVE-2021-43783: Path Traversal in @backstage/plugin-scaffolder-backend
Summary
CVE-2021-43783: Path Traversal in @backstage/plugin-scaffolder-backend. Affects @backstage/plugin-scaffolder-backend versions < 0.15.14. Fixed in 0.15.14. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @backstage/plugin-scaffolder-backend is an npm package that provides backend functionality for scaffolding templates in the Backstage framework. It allows users to register and execute templates to generate code and files for their projects. This package is vulnerable to a path traversal attack, where a malicious actor with write access to a registered scaffolder template can manipulate the template to write files to arbitrary paths on the host instance. This vulnerability can also be exploited through user input when executing a template, although the attacker's control over the file contents is limited unless the template is crafted in a specific way.
Vulnerability Detail
The path traversal vulnerability in @backstage/plugin-scaffolder-backend allows an attacker to write files to arbitrary paths on the host instance. This can lead to unauthorized access, data leakage, or even remote code execution. The vulnerability can be exploited by manipulating the registered scaffolder templates or by injecting malicious input when executing a template. The impact of the attack depends on the permissions of the host instance and the sensitivity of the files that can be written. The vulnerability has been assigned a CVSS score of 8.5 (High).
How To Fix
Latest published version: 4.2.1 as of 22 Oct 2026
npm install @backstage/plugin-scaffolder-backend@4.2.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.15.14
This is the first release that contains the fix.
npm install @backstage/plugin-scaffolder-backend@0.15.14
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, access and modification of scaffolder templates should be restricted to trusted users. Implementing a review process for registering or modifying templates can help mitigate the risk of exploitation. Additionally, input validation and sanitization should be performed when executing templates to prevent injection of malicious input.
Conclusion
The path traversal vulnerability in @backstage/plugin-scaffolder-backend can allow an attacker to write files to arbitrary paths on the host instance, potentially leading to unauthorized access, data leakage, or remote code execution. It is recommended to update to version 0.15.14 of the package to fix the vulnerability. Restricting access to and reviewing the registration and modification of scaffolder templates can also help mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for @backstage/plugin-scaffolder-backend →
FAQ
The vulnerability allows an attacker to write files to arbitrary paths on the host instance, potentially leading to unauthorized access, data leakage, or remote code execution.
Yes, in some situations, the vulnerability can be exploited through user input when executing a template. However, the attacker's control over the file contents is limited unless the template is crafted in a specific way.
Restricting access and requiring reviews when registering or modifying scaffolder templates can help mitigate the risk of exploitation. Additionally, input validation and sanitization should be performed when executing templates.
Yes, the vulnerability has been fixed in version 0.15.14 of the @backstage/plugin-scaffolder-backend package. It is recommended to update to this version to mitigate the path traversal issue.
For more information, you can open an issue in the Backstage repository on GitHub or visit the Backstage README for links to the chat and other resources.
References
Related vulnerabilities
Recent vulnerabilities recorded for @backstage/plugin-scaffolder-backend.