GHSA-2g8g-63j4-9w3r RCE vulnerability affecting v1beta3 templates in @backstage/plugin-scaffolder-backend

Not scored Published

An attacker with write access to scaffolder templates can achieve remote code execution on the backend by injecting malicious code into template definitions.

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 GHSA-2g8g-63j4-9w3r?

GHSA-2g8g-63j4-9w3r is a code injection vulnerability in @backstage/plugin-scaffolder-backend, published on 1 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

The templating library used by the scaffolder backend assumes that templates are trusted which is an undesired property of the scaffolder-backend. This has now been mitigated by sandboxing the template code execution.

Impact

A malicious actor with write access to a registered scaffolder template could manipulate the template in a way that allows for remote code execution on the scaffolder-backend instance. This was only exploitable in the template yaml definition itself and not by user input data.

Patches

This is vulnerability is patched in version 0.15.14 of @backstage/plugin-scaffolder-backend.

For more information

If you have any questions or comments about this advisory:

Which versions are affected by GHSA-2g8g-63j4-9w3r?

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

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

How do I fix GHSA-2g8g-63j4-9w3r?

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

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is GHSA-2g8g-63j4-9w3r being exploited?

There is no known exploitation of GHSA-2g8g-63j4-9w3r in the wild and no public exploit code.

Sources

Is GHSA-2g8g-63j4-9w3r in your software?

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

Check your SBOMs for free