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

High 8.5 Published Updated

Attackers can write files to arbitrary paths on the host via template manipulation or user input, potentially leading to code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-43783?

CVE-2021-43783 is a high-severity path traversal vulnerability in Linuxfoundation Backstage, published on 29 Nov 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

@backstage/plugin-scaffolder-backend is the backend for the default Backstage software templates. In affected versions a malicious actor with write access to a registered scaffolder template is able to manipulate the template in a way that writes files to arbitrary paths on the scaffolder-backend host instance. This vulnerability can in some situation also be exploited through user input when executing a template, meaning you do not need write access to the templates. This method will not allow the attacker to control the contents of the injected file however, unless the template is also crafted in a specific way that gives control of the file contents. This vulnerability is fixed in version `0.15.14` of the `@backstage/plugin-scaffolder-backend`. This attack is mitigated by restricting access and requiring reviews when registering or modifying scaffolder templates.

Weakness: CWE-22

Which versions are affected by CVE-2021-43783?

2 open source packages ship an affected version, including @backstage/plugin-scaffolder-backend. It affects 1 product.

PackageAffectedFixed in
@backstage/plugin-scaffolder-backend npmAll versions0.15.14
@backstage/plugin-scaffolder-backend npmAll versions0.15.14

Products include Linuxfoundation Backstage.

How do I fix CVE-2021-43783?

Upgrade @backstage/plugin-scaffolder-backend to 0.15.14 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-43783 being exploited?

There is no known exploitation of CVE-2021-43783 in the wild and no public exploit code.

All Linuxfoundation Backstage vulnerabilities

Sources

Also known as GHSA-mg3m-f475-28hv.

Is CVE-2021-43783 in your software?

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

Check your SBOMs for free