CVE-2023-35926: @backstage/plugin scaffolder backend Backstage Scaffolder Plugin Has Insecure Vulnerability
HIGHCVE-2023-35926 is a HIGH (CVSS 8.0) backstage scaffolder plugin has insecure vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @backstage/plugin scaffolder backend libraries in the npm ecosystem. The issue involves backstage scaffolder plugin has insecure sandbox. Remediation is available by upgrading affected packages to version 1.15.0.
CVE-2023-35926 at a Glance
Security Impact
CVSS: 8.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2023-35926
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.
npm install @backstage/plugin-scaffolder-backend@1.15.0
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 CVE-2023-35926, 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 1.15.0), 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 CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. 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
CVE-2023-35926 Affected @backstage/plugin scaffolder backend Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@backstage/plugin-scaffolder-backend
|
npm |
< 1.15.0
|
1.15.0
|
References
Frequently Asked Questions
What is CVE-2023-35926?
Which @backstage/plugin scaffolder backend versions are affected?
What version fixes CVE-2023-35926?
Is @backstage/plugin-scaffolder-backend affected?
What is the CVSS score of CVE-2023-35926?
What CWE is associated with CVE-2023-35926?
How can I check npm dependencies for CVE-2023-35926?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wg6p-jmpc-xjmr",
"modified" : "2023-06-21T22:00:30Z",
"published" : "2023-06-21T22:00:30Z",
"aliases" : [ "CVE-2023-35926" ],
"summary" : "Backstage Scaffolder plugin has insecure sandbox",
"details" : "The Backstage scaffolder-backend plugin uses a templating library that requires a sandbox, as it by design allows for code injection. The library used for this sandbox so far has been `vm2`, but in light of several past vulnerabilities and existing vulnerabilities that may not have a fix, the plugin has switched to using a different sandbox library.\n\n### Impact\n\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\n\nThis is vulnerability is fixed in version 1.15.0 of `@backstage/plugin-scaffolder-backend`.\n\n### Workarounds\n\nNote that the [Backstage Threat Model](https://backstage.io/docs/overview/threat-model) states that scaffolder templates are considered to be a sensitive area that with the recommendation that you control access and perform manual reviews of changes to the scaffolder templates. The exploit is of a nature where it is easily discoverable in manual review.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/plugin-scaffolder-backend"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.15.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/security/advisories/GHSA-wg6p-jmpc-xjmr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35926"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/commit/fb7375507d56faedcb7bb3665480070593c8949a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/backstage/backstage"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/releases/tag/v1.15.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-21T22:00:30Z",
"nvd_published_at" : "2023-06-22T14:15:09Z"
}
}