CVE-2021-43776: @backstage/plugin auth backend Cross-Site Scripting Vulnerability
HIGHCVE-2021-43776 is a HIGH (CVSS 7.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @backstage/plugin auth backend libraries in the npm ecosystem. The issue involves cross-site scripting vulnerability in @backstage/plugin-auth-backend. Remediation is available by upgrading affected packages to version 0.4.9.
CVE-2021-43776 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2021-43776
To remediate this vulnerability, upgrade all affected @backstage/plugin auth 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-auth-backend@0.4.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @backstage/plugin-auth-backend
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-43776, inspect your project dependencies using npm:
npm ls @backstage/plugin-auth-backend
Analyze the terminal output to locate any version of @backstage/plugin auth backend in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.9), your application is affected.
Note: The npm ls @backstage/plugin-auth-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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @backstage/plugin auth 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-2021-43776 Affected @backstage/plugin auth backend Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@backstage/plugin-auth-backend
|
npm |
< 0.4.9
|
0.4.9
|
References
Frequently Asked Questions
What is CVE-2021-43776?
Which @backstage/plugin auth backend versions are affected?
What version fixes CVE-2021-43776?
Is @backstage/plugin-auth-backend affected?
What is the CVSS score of CVE-2021-43776?
What CWE is associated with CVE-2021-43776?
How can I check npm dependencies for CVE-2021-43776?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w7fj-336r-vw49",
"modified" : "2021-12-01T14:35:30Z",
"published" : "2021-12-01T18:29:21Z",
"aliases" : [ "CVE-2021-43776" ],
"summary" : "Cross-Site Scripting vulnerability in @backstage/plugin-auth-backend",
"details" : "### Impact\nThis vulnerability allows a malicious actor to trick another user into visiting a vulnerable URL that executes an XSS attack. This attack can potentially allow the attacker to exfiltrate access tokens or other secrets from the user's browser. The default CSP does prevent this attack, but it is expected that some deployments have these policies disabled due to incompatibilities.\n\n### Patches\nThis is vulnerability is patched in version `0.4.9` of `@backstage/plugin-auth-backend`.\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)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/plugin-auth-backend"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/security/advisories/GHSA-w7fj-336r-vw49"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43776"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/backstage/backstage"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/tree/master/plugins/auth-backend"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-29T19:19:57Z",
"nvd_published_at" : "2021-11-26T19:15:00Z"
}
}