Vulnerabilities in pkg:npm/@backstage/catalog-model
PACKAGECVE-2023-25571 is a MODERATE (CVSS 6.8) cross site scripting vulnerability vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @backstage/core components libraries in the npm ecosystem. The issue involves cross site scripting vulnerability in backstage software catalog. Remediation is available by upgrading affected packages to version 0.12.4, 1.2.0, 1.7.2.
pkg:npm/@backstage/catalog-model
Vulnerability advisories affecting package pkg:npm/@backstage/catalog-model. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7hv8-3fr9-j2hv | CVE-2023-25571 | MODERATE | Cross site scripting Vulnerability in backstage Software Catalog |
CVE-2023-25571 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2023-25571
To remediate this vulnerability, upgrade all affected @backstage/core components 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/core-components@0.12.4
npm install @backstage/catalog-model@1.2.0
npm install @backstage/plugin-catalog-backend@1.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @backstage/core-components
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-25571, inspect your project dependencies using npm:
npm ls @backstage/core-components
Analyze the terminal output to locate any version of @backstage/core components in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.4), your application is affected.
Note: The npm ls @backstage/core-components 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/core components, 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-25571 Affected @backstage/core components Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@backstage/core-components
|
npm |
< 0.12.4
|
0.12.4
|
|
@backstage/catalog-model
|
npm |
< 1.2.0
|
1.2.0
|
|
@backstage/plugin-catalog-backend
|
npm |
< 1.7.2
|
1.7.2
|
References
Frequently Asked Questions
What is CVE-2023-25571?
Which @backstage/core components versions are affected?
What version fixes CVE-2023-25571?
Is @backstage/core-components affected?
Is @backstage/catalog-model affected?
What is the CVSS score of CVE-2023-25571?
What CWE is associated with CVE-2023-25571?
How can I check npm dependencies for CVE-2023-25571?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7hv8-3fr9-j2hv",
"modified" : "2023-02-14T21:35:10Z",
"published" : "2023-02-14T21:35:10Z",
"aliases" : [ "CVE-2023-25571" ],
"summary" : "Cross site scripting Vulnerability in backstage Software Catalog",
"details" : "### Impact\n\nThis vulnerability allows a malicious actor with access to add or modify content in an instance of the Backstage software catalog to inject script URLs in the entities stored in the catalog. If users of the catalog then click on said URLs, that can lead to an XSS attack.\n\n### Patches\n\nThis vulnerability has been patched in both the frontend and backend implementations. The default `Link` component from `@backstage/core-components` will now reject `javascript:` URLs, and there is a global override of `window.open` to do the same.\n\nIn addition the catalog model as well as the catalog backend now has additional validation built in that prevents `javascript:` URLs in known annotations.\n\n### Workarounds\n\nThe general practice of limiting access to modifying catalog content and requiring code reviews greatly helps mitigate this vulnerability.\n\n### For more information\n\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 the [Backstage README](https://github.com/backstage/backstage)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/core-components"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/catalog-model"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/plugin-catalog-backend"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/security/advisories/GHSA-7hv8-3fr9-j2hv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25571"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/commit/3d1371954512f7fa8bd0e2d357e00eada2c3e8a8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/backstage/backstage"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-14T21:35:10Z",
"nvd_published_at" : "2023-02-14T18:15:00Z"
}
}