Medium, CVSS 5.4npmAmendedPublished
Cross-Site-Scripting attack on
CVE-2023-25572 · GHSA-5jcr-82fh-339v
- Affected
- npm ra-ui-materialui >= 4.0.0, < 4.7.6; < 3.19.12
- Fixed in
- 3.19.124.7.6· Vendor fix available
- Issue
- Impact All React applications built with react-admin and using the <RichTextField are affected. <RichTextField outputs the field value using dangerouslySetInnerHTML without client-side sanitization. If the data isn't sanitized server-side, this opens a possible Cross-Site-Scripting (XSS) attack. Proof of concept: Patches Versions 3.19.12 and 4.7.6 now use DOMPurify to escape the HTML before outputting it with React and dangerouslySetInnerHTML Workarounds You don't need to upgrade if you already sanitize HTML data server-side. Otherwise, you'll have to replace the <RichTextField by a custom field doing sanitization by hand: References https://github.com/marmelab/react-admin/pull/8644, https://github.com/marmelab/react-admin/pull/8645
Recommended action: Upgrade to 4.7.6 or 3.19.12 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.