Vulnerabilities in pkg:npm/@udecode/plate-link
PACKAGECVE-2023-34245 is a HIGH (CVSS 8.1) ` scheme vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @udecode/plate link libraries in the npm ecosystem. The issue involves ` scheme. Remediation is available by upgrading affected packages to version 20.0.0.
pkg:npm/@udecode/plate-link
Vulnerability advisories affecting package pkg:npm/@udecode/plate-link. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4882-hxpr-hrvm | CVE-2023-34245 | HIGH | @udecode/plate-link does not sanitize URLs to prevent use of the `javascript:` scheme |
CVE-2023-34245 at a Glance
Security Impact
CVSS: 8.1
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:U/C:H/I:H/A:N).
How to Fix CVE-2023-34245
To remediate this vulnerability, upgrade all affected @udecode/plate link 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 @udecode/plate-link@20.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @udecode/plate-link
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-34245, inspect your project dependencies using npm:
npm ls @udecode/plate-link
Analyze the terminal output to locate any version of @udecode/plate link in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 20.0.0), your application is affected.
Note: The npm ls @udecode/plate-link 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 @udecode/plate link, 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-34245 Affected @udecode/plate link Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@udecode/plate-link
|
npm |
< 20.0.0
|
20.0.0
|
References
Frequently Asked Questions
What is CVE-2023-34245?
Which @udecode/plate link versions are affected?
What version fixes CVE-2023-34245?
Is @udecode/plate-link affected?
What is the CVSS score of CVE-2023-34245?
What CWE is associated with CVE-2023-34245?
How can I check npm dependencies for CVE-2023-34245?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4882-hxpr-hrvm",
"modified" : "2023-06-09T22:41:56Z",
"published" : "2023-06-09T22:41:56Z",
"aliases" : [ "CVE-2023-34245" ],
"summary" : "@udecode/plate-link does not sanitize URLs to prevent use of the `javascript:` scheme",
"details" : "### Impact\nAffected versions of the link plugin and link UI component do not sanitize URLs to prevent use of the `javascript:` scheme. As a result, links with JavaScript URLs can be inserted into the Plate editor through various means, including opening or pasting malicious content.\n\n### Patches\n`@udecode/plate-link` 20.0.0 resolves this issue by introducing an `allowedSchemes` option to the link plugin, defaulting to `['http', 'https', 'mailto', 'tel']`. URLs using a scheme that isn't in this list will not be rendered to the DOM.\n\n### Workarounds\nIf you are unable to update `@udecode/plate-link` to version 20.0.0, we recommend overriding the `LinkElement` and `PlateFloatingLink` components with implementations that explicitly check the URL scheme before rendering any anchor elements.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@udecode/plate-link"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "20.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/udecode/plate/security/advisories/GHSA-4882-hxpr-hrvm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34245"
}, {
"type" : "WEB",
"url" : "https://github.com/udecode/plate/pull/2240"
}, {
"type" : "WEB",
"url" : "https://github.com/udecode/plate/commit/93dd5712854660874900ae12e4d8e6ff28089eb7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/udecode/plate"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-09T22:41:56Z",
"nvd_published_at" : "2023-06-09T18:15:09Z"
}
}