Cross-site Scripting (XSS) in media embed element when using custom URL parsers in plate media
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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're 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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| udecode | plate | before 36.0.10 | 36.0.10 | Patch available | CNA |
| — | @udecode/plate-media (npm) | before 36.0.10 | 36.0.10 | Patch available | GHSA-h3pq-667x-r789 |
- plate Vendorudecode Affected before 36.0.10 Fixed in 36.0.10 Patch available CNA
- @udecode/plate-media (npm) Vendor— Affected before 36.0.10 Fixed in 36.0.10 Patch available GHSA-h3pq-667x-r789
Remediation
- Fix · CNA plate (udecode) Fixed in 36.0.10
- Fix · GHSA-h3pq-667x-r789 @udecode/plate-media (npm) Fixed in 36.0.10 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-40631
- 2026-10-03 Alias added: GHSA-h3pq-667x-r789
References
More udecode vulnerabilities
- TI-2026-40133 Plate: Media embed provider metadata can bypass URL sanitization and execute iframe JavaScript CVSS 3.1HIGH 8.7
- TI-2026-46915 Plate: SSRF with response disclosure in DOCX image embedding CVSS 3.1HIGH 8.2
- TI-2023-17081 Cross site scripting (XSS) in @udecode/plate-link CVSS 3.1HIGH 8.1
- TI-2024-31443 Arbitrary DOM attributes in element.attributes and leaf.attributes in Platejs CVSS 3.1HIGH 8.3
- TI-2026-60308 @platejs/core HTML deserialization can trigger browser behavior during parsing CVSS 3.1MEDIUM 6.1
Sources
- CVE-2024-40631 · CVE Program
- CVE-2024-40631 · NVD
- FIRST EPSS
- GHSA-h3pq-667x-r789 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences