{"id":"CVE-2023-25572","published":"2023-02-13T20:49:54Z","modified":"2025-03-10T21:12:31Z","title":"React-Admin vulnerable to Cross-Site-Scripting attack on `<RichTextField>`","vendor":"marmelab","product":"react-admin","tier":"tail","description":{"text":"react-admin is a frontend framework for building browser applications on top of REST/GraphQL APIs. react-admin prior to versions 3.19.12 and 4.7.6, along with ra-ui-materialui prior to 3.19.12 and 4.7.6, are vulnerable to cross-site scripting. 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. Versions 3.19.12 and 4.7.6 now use `DOMPurify` to escape the HTML before outputting it with React and `dangerouslySetInnerHTML`. Users who already sanitize HTML data server-side do not need to upgrade. As a workaround, users may replace the `<RichTextField>` by a custom field doing sanitization by hand.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00674,"percentile":0.4724,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/marmelab/react-admin/security/advisories/GHSA-5jcr-82fh-339v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/marmelab/react-admin/pull/8644","tags":["x_refsource_MISC"]},{"url":"https://github.com/marmelab/react-admin/pull/8645","tags":["x_refsource_MISC"]},{"url":"https://github.com/marmelab/react-admin/releases/tag/v3.19.12","tags":["x_refsource_MISC"]},{"url":"https://github.com/marmelab/react-admin/releases/tag/v4.7.6","tags":["x_refsource_MISC"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":9.45},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"marmelab","affectedVersions":[{"vendor":"marmelab","product":"react-admin","versions":["< 3.19.12",">= 4.0.0, < 4.7.6"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T21:00:46.979789Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"react-admin","vulnerableRanges":["<3.19.12",">=4.0.0, <4.7.6"],"patched":["3.19.12","4.7.6"],"from":["GHSA-5jcr-82fh-339v"],"provenance":"source"},{"ecosystem":"npm","package":"ra-ui-materialui","vulnerableRanges":[">=4.0.0, <4.7.6","<3.19.12"],"patched":["4.7.6","3.19.12"],"from":["GHSA-5jcr-82fh-339v"],"provenance":"source"}],"summary":{"text":"The <RichTextField> component in react-admin, and in the ra-ui-materialui package, renders field values as raw HTML via dangerouslySetInnerHTML without client-side sanitization, so any React application using it is affected. An attacker who can get HTML containing script into the data that the field displays can achieve cross-site scripting, which requires a low-privilege account, network access, and user interaction, and it is only exploitable where the data is not already sanitized server-side.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:13Z"},"euvd":{"id":"EUVD-2023-0631","exploited":false,"provenance":"source"}}