CVE-2021-41151 Path Traversal in @backstage/plugin-scaffolder-backend
Attackers with template creation rights can read sensitive files via path traversal in Scaffolder tasks, exposing data in pull requests.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-41151?
CVE-2021-41151 is a medium-severity path traversal vulnerability in Linuxfoundation Backstage, published on 18 Oct 2021. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
Backstage is an open platform for building developer portals. In affected versions A malicious actor could read sensitive files from the environment where Scaffolder Tasks are run. The attack is executed by crafting a custom Scaffolder template with a `github:publish:pull-request` action and a particular source path. When the template is executed the sensitive files would be included in the published pull request. This vulnerability is mitigated by the fact that an attacker would need access to create and register templates in the Backstage catalog, and that the attack is very visible given that the exfiltration happens via a pull request. The vulnerability is patched in the `0.15.9` release of `@backstage/plugin-scaffolder-backend`.
Weakness: CWE-22
Which versions are affected by CVE-2021-41151?
2 open source packages ship an affected version, including @backstage/plugin-scaffolder-backend. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@backstage/plugin-scaffolder-backend npm | From 0.9.4 | 0.15.9 |
@backstage/plugin-scaffolder-backend npm | From 0.9.4 | 0.15.9 |
Products include Linuxfoundation Backstage.
How do I fix CVE-2021-41151?
Upgrade @backstage/plugin-scaffolder-backend to 0.15.9 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-41151 being exploited?
There is no known exploitation of CVE-2021-41151 in the wild and no public exploit code.
Other vulnerabilities in Linuxfoundation Backstage
- CVE-2026-106501 Backstage: Sensitive information exposure in Scaffolder
- CVE-2026-106558 Backstage: Improper validation of TechDocs MkDocs configuration
- CVE-2026-88064 Backstage: Improper input validation in TechDocs MkDocs configuration
- CVE-2026-106459 Backstage: Improper input validation in Sentry scaffolder actions
- CVE-2026-106486 Backstage: Improper filesystem validation in Bitbucket pull-request scaffolder actions
Sources
Also known as GHSA-pvv8-8fx9-h673.