CVE-2021-41151 Path Traversal in @backstage/plugin-scaffolder-backend

Medium 6.8 Published Updated

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.

PackageAffectedFixed in
@backstage/plugin-scaffolder-backend npmFrom 0.9.40.15.9
@backstage/plugin-scaffolder-backend npmFrom 0.9.40.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.

All Linuxfoundation Backstage vulnerabilities

Sources

Also known as GHSA-pvv8-8fx9-h673.

Is CVE-2021-41151 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free