GHSA-2g8g-63j4-9w3r: @backstage/plugin scaffolder backend Remote Code Execution Vulnerability

HIGH
Published
Advisory Summary

GHSA-2g8g-63j4-9w3r is a HIGH remote code execution vulnerability (General Security Weakness) affecting @backstage/plugin scaffolder backend libraries in the npm ecosystem. The issue involves rce vulnerability affecting v1beta3 templates in @backstage/plugin-scaffolder-backend. Remediation is available by upgrading affected packages to version 0.15.14.

GHSA-2g8g-63j4-9w3r at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-2g8g-63j4-9w3r
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product @backstage/plugin scaffolder backend
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-2g8g-63j4-9w3r

To remediate this vulnerability, upgrade all affected @backstage/plugin scaffolder backend dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@backstage/plugin-scaffolder-backend fixed: 0.15.14
npm install @backstage/plugin-scaffolder-backend@0.15.14
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @backstage/plugin-scaffolder-backend

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-2g8g-63j4-9w3r, inspect your project dependencies using npm:

npm ls @backstage/plugin-scaffolder-backend

Analyze the terminal output to locate any version of @backstage/plugin scaffolder backend in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.14), your application is affected.

Note: The npm ls @backstage/plugin-scaffolder-backend command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In @backstage/plugin scaffolder backend, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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: * Open an issue in the [Backstage repository](https://github.com/backstage/backstage) * Visit our chat, linked to in [Backstage README](https://github.com/backstage/backstage)

GHSA-2g8g-63j4-9w3r Affected @backstage/plugin scaffolder backend Versions

1 component(s)
Fixed Versions:
0.15.14
Product / Package Ecosystem Affected Versions Fixed Version
@backstage/plugin-scaffolder-backend
npm
< 0.15.14
0.15.14

References

Frequently Asked Questions

What is GHSA-2g8g-63j4-9w3r?
GHSA-2g8g-63j4-9w3r is a security vulnerability in @backstage/plugin scaffolder backend involving RCE vulnerability affecting v1beta3 templates in @backstage/plugin-scaffolder-backend under General Security Weakness.
Which @backstage/plugin scaffolder backend versions are affected?
Affected versions include releases prior to 0.15.14 across affected packages: @backstage/plugin-scaffolder-backend.
What version fixes GHSA-2g8g-63j4-9w3r?
Upgrading to 0.15.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @backstage/plugin-scaffolder-backend affected?
Yes, @backstage/plugin-scaffolder-backend is affected in releases prior to 0.15.14. Upgrade your dependency to 0.15.14 or later.
What CWE is associated with GHSA-2g8g-63j4-9w3r?
GHSA-2g8g-63j4-9w3r is classified under General Security Weakness.
How can I check npm dependencies for GHSA-2g8g-63j4-9w3r?
Run the dependency tree command: 'npm ls @backstage/plugin-scaffolder-backend'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2g8g-63j4-9w3r",
  "modified" : "2021-11-29T19:39:57Z",
  "published" : "2021-12-01T18:29:12Z",
  "aliases" : [ ],
  "summary" : "RCE vulnerability affecting v1beta3 templates in @backstage/plugin-scaffolder-backend",
  "details" : "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.\n\n### Impact\nA 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.\n\n### Patches\nThis is vulnerability is patched in version `0.15.14` of `@backstage/plugin-scaffolder-backend`.\n\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Open an issue in the [Backstage repository](https://github.com/backstage/backstage)\n* Visit our chat, linked to in [Backstage README](https://github.com/backstage/backstage)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/plugin-scaffolder-backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.15.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/security/advisories/GHSA-2g8g-63j4-9w3r"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/backstage/backstage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-29T19:39:57Z",
    "nvd_published_at" : null
  }
}