{"id":"EUVD-2024-2354","enisaUuid":"666b5844-25e0-37c9-bfa9-653aac5bd5a3","description":"Plate media is an open source, rich-text editor for React. Editors that use `MediaEmbedElement` and pass custom `urlParsers` to the `useMediaState` hook may be vulnerable to XSS if a custom parser allows `javascript:`, `data:` or `vbscript:` URLs to be embedded. Editors that do not use `urlParsers` and consume the `url` property directly may also be vulnerable if the URL is not sanitised. The default parsers `parseTwitterUrl` and `parseVideoUrl` are not affected. `@udecode/plate-media` 36.0.10 resolves this issue by only allowing HTTP and HTTPS URLs during parsing. This affects only the `embed` property returned from `useMediaState`. In addition, the `url` property returned from `useMediaState` has been renamed to `unsafeUrl` to indicate that it has not been sanitised. The `url` property on `element` is also unsafe, but has not been renamed. If you\u0027re using either of these properties directly, you will still need to validate the URL yourself. Users are advised to upgrade. Users unable to upgrade should ensure that any custom `urlParsers` do not allow `javascript:`, `data:` or `vbscript:` URLs to be returned in the `url` property of their return values. If `url` is consumed directly, validate the URL protocol before passing it to the `iframe` element.\n\n","datePublished":"Jul 15, 2024, 6:21:16 PM","dateUpdated":"Aug 2, 2024, 4:33:11 AM","baseScore":8.1,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","references":"https://github.com/udecode/plate/security/advisories/GHSA-h3pq-667x-r789\nhttps://github.com/udecode/plate/commit/1bc0971774fbfb770780c9bdb94746a6f0f196a0\nhttps://stackoverflow.com/a/43467144\n","aliases":"CVE-2024-40631\nGHSA-h3pq-667x-r789\n","assigner":"GitHub_M","epss":0.5,"enisaIdProduct":[{"id":"8ad1ef91-2243-316e-bfcc-2729daec1884","product":{"name":"plate","vendor":{"name":"udecode"}},"product_version":"\u003c 36.0.10"}],"enisaIdVendor":[{"id":"45e97853-47bc-33c5-b6ef-fe20483f0732","vendor":{"name":"udecode"}}],"enisaIdVulnerability":[{"id":"87023dcc-22d4-31f8-9606-386176e12ccb","vulnerability":{"id":"GHSA-h3pq-667x-r789","description":"Plate media plugins has a XSS in media embed element when using custom URL parsers","datePublished":"Jul 15, 2024, 6:33:22 PM","dateUpdated":"Jul 15, 2024, 9:38:09 PM","baseScore":null,"references":"https://github.com/udecode/plate/security/advisories/GHSA-h3pq-667x-r789\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-40631\nhttps://github.com/udecode/plate/commit/1bc0971774fbfb770780c9bdb94746a6f0f196a0\nhttps://github.com/udecode/plate\nhttps://stackoverflow.com/a/43467144\n","enisa_id":"EUVD-2024-2354\n","aliases":"GHSA-h3pq-667x-r789\nCVE-2024-40631\n","epss":0.0,"dataProcessed":"Nov 15, 2026, 2:38:00 AM","vulnerabilityProduct":[],"vulnerabilityVendor":[]}},{"id":"c0da0168-5af0-3a3d-bee3-68f075ce856e","vulnerability":{"id":"CVE-2024-40631","description":"Plate media is an open source, rich-text editor for React. Editors that use `MediaEmbedElement` and pass custom `urlParsers` to the `useMediaState` hook may be vulnerable to XSS if a custom parser allows `javascript:`, `data:` or `vbscript:` URLs to be embedded. Editors that do not use `urlParsers` and consume the `url` property directly may also be vulnerable if the URL is not sanitised. The default parsers `parseTwitterUrl` and `parseVideoUrl` are not affected. `@udecode/plate-media` 36.0.10 resolves this issue by only allowing HTTP and HTTPS URLs during parsing. This affects only the `embed` property returned from `useMediaState`. In addition, the `url` property returned from `useMediaState` has been renamed to `unsafeUrl` to indicate that it has not been sanitised. The `url` property on `element` is also unsafe, but has not been renamed. If you\u0027re using either of these properties directly, you will still need to validate the URL yourself. Users are advised to upgrade. Users unable to upgrade should ensure that any custom `urlParsers` do not allow `javascript:`, `data:` or `vbscript:` URLs to be returned in the `url` property of their return values. If `url` is consumed directly, validate the URL protocol before passing it to the `iframe` element.\n\n","datePublished":"Jul 15, 2024, 6:21:16 PM","dateUpdated":"Aug 2, 2024, 4:33:11 AM","status":"PUBLISHED","baseScore":8.1,"baseScoreVersion":"3.1","baseScoreVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","references":"https://github.com/udecode/plate/security/advisories/GHSA-h3pq-667x-r789\nhttps://github.com/udecode/plate/commit/1bc0971774fbfb770780c9bdb94746a6f0f196a0\nhttps://stackoverflow.com/a/43467144\n","enisa_id":"EUVD-2024-2354\n","assigner":"GitHub_M","epss":0.5,"dataProcessed":"Nov 16, 2026, 7:22:38 AM","vulnerabilityProduct":[{"id":"a8254769-be90-3bed-9c60-bd8af93ff7f3","product":{"name":"plate","vendor":{"name":"udecode"}},"product_version":"\u003c 36.0.10"}],"vulnerabilityVendor":[{"id":"9633dfe4-0ddc-3087-a703-4eaf693aeb82","vendor":{"name":"udecode"}}]}}],"enisaIdAdvisory":[]}