CVE-2024-26150: @backstage/backend common Path Traversal Vulnerability
HIGHCVE-2024-26150 is a HIGH (CVSS 8.7) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @backstage/backend common libraries in the npm ecosystem. The issue involves `@backstage/backend-common` vulnerable to path traversal through symlinks. Remediation is available by upgrading affected packages to version 0.21.1, 0.19.10, 0.20.2.
CVE-2024-26150 at a Glance
Security Impact
CVSS: 8.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2024-26150
To remediate this vulnerability, upgrade all affected @backstage/backend common 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/backend-common@0.21.1
npm install @backstage/backend-common@0.19.10
npm install @backstage/backend-common@0.20.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @backstage/backend-common
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-26150, inspect your project dependencies using npm:
npm ls @backstage/backend-common
Analyze the terminal output to locate any version of @backstage/backend common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.1), your application is affected.
Note: The npm ls @backstage/backend-common 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @backstage/backend common, 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-2024-26150 Affected @backstage/backend common Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@backstage/backend-common
|
npm |
≥ 0.21.0
< 0.21.1
All 1 versions
0.21.0
|
0.21.1
|
|
@backstage/backend-common
|
npm |
< 0.19.10
|
0.19.10
|
|
@backstage/backend-common
|
npm |
≥ 0.20.0
< 0.20.2
|
0.20.2
|
References
Frequently Asked Questions
What is CVE-2024-26150?
Which @backstage/backend common versions are affected?
What version fixes CVE-2024-26150?
Is @backstage/backend-common affected?
What is the CVSS score of CVE-2024-26150?
What CWE is associated with CVE-2024-26150?
How can I check npm dependencies for CVE-2024-26150?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2fc9-xpp8-2g9h",
"modified" : "2024-02-23T19:43:19Z",
"published" : "2024-02-23T18:02:08Z",
"aliases" : [ "CVE-2024-26150" ],
"summary" : "`@backstage/backend-common` vulnerable to path traversal through symlinks",
"details" : "### Impact\n\nPaths checks with the `resolveSafeChildPath` utility were not exhaustive enough, leading to risk of path traversal vulnerabilities if symlinks can be injected by attackers.\n\n### Patches\nPatched in `@backstage/backend-common` version `0.21.1`.\nPatched in `@backstage/backend-common` version `0.20.2`.\nPatched in `@backstage/backend-common` version `0.19.10`.\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 Discord, linked to in [Backstage README](https://github.com/backstage/backstage)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/backend-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.21.0"
}, {
"fixed" : "0.21.1"
} ]
} ],
"versions" : [ "0.21.0" ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/backend-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.19.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@backstage/backend-common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.20.0"
}, {
"fixed" : "0.20.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/security/advisories/GHSA-2fc9-xpp8-2g9h"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-26150"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/commit/1ad2b1b61ebb430051f7d804b0cc7ebfe7922b6f"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/commit/78f892b3a84d63de2ba167928f171154c447b717"
}, {
"type" : "WEB",
"url" : "https://github.com/backstage/backstage/commit/edf65d7d31e027599c2415f597d085ee84807871"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/backstage/backstage"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-23T18:02:08Z",
"nvd_published_at" : "2024-02-23T16:15:48Z"
}
}