CVE-2021-41151: Path Traversal in @backstage/plugin-scaffolder-backend
Summary
CVE-2021-41151: Path Traversal in @backstage/plugin-scaffolder-backend. Affects @backstage/plugin-scaffolder-backend versions >= 0.9.4, < 0.15.9. Fixed in 0.15.9. 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 package is an npm package that is part of the Backstage framework. It provides functionality for creating and running Scaffolder tasks, which are used to generate code and configuration files for projects. The package allows users to define custom templates and execute them to generate files based on the template. However, a vulnerability has been discovered in the package that allows a malicious actor to read sensitive files from the environment where Scaffolder tasks are run.
Vulnerability Detail
The vulnerability, identified as CVE-2021-41151, is a path traversal vulnerability. By crafting a custom Scaffolder template with a publish:github:pull-request action using a specific source path, an attacker can include sensitive files in the published pull request. This can lead to the unauthorized disclosure of sensitive information. It is important to note that the attacker would need access to create and register templates in the Backstage catalog, and the exfiltration of files via a pull request would be highly visible.
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.9
This is the first release that contains the fix.
npm install @backstage/plugin-scaffolder-backend@0.15.9
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to update to the patched version as soon as possible.
Conclusion
In conclusion, the @backstage/plugin-scaffolder-backend package is vulnerable to a path traversal vulnerability that allows an attacker to read sensitive files. This vulnerability has been patched in version 0.15.9 of the package, and users are advised to update to the latest version to fix the vulnerability. If you have any further questions or need assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for @backstage/plugin-scaffolder-backend →
FAQ
The vulnerability allows an attacker to read sensitive files from the environment where Scaffolder tasks are run. This can lead to the unauthorized disclosure of sensitive information.
Users of the @backstage/plugin-scaffolder-backend package versions 0.9.4 to 0.15.8 are affected by this vulnerability.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply enter your package-lock.json file and the playground will analyze it for vulnerabilities.
Yes, the CVSS score for this vulnerability is 6.8, indicating a moderate severity.
The vulnerability is mitigated by the fact that an attacker would need access to create and register templates in the Backstage catalog, and the exfiltration of files via a pull request would be highly visible.
References
Related vulnerabilities
Recent vulnerabilities recorded for @backstage/plugin-scaffolder-backend.