{"id":"CVE-2023-25572","summary":"React-Admin vulnerable to Cross-Site-Scripting attack on `\u003cRichTextField\u003e`","details":"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 `\u003cRichTextField\u003e` are affected. `\u003cRichTextField\u003e` 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 `\u003cRichTextField\u003e` by a custom field doing sanitization by hand.\n","aliases":["GHSA-5jcr-82fh-339v"],"modified":"2026-08-12T03:51:10.334329131Z","published":"2023-02-13T20:49:54.340Z","database_specific":{"cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/25xxx/CVE-2023-25572.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/marmelab/react-admin/releases/tag/v3.19.12"},{"type":"WEB","url":"https://github.com/marmelab/react-admin/releases/tag/v4.7.6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/25xxx/CVE-2023-25572.json"},{"type":"ADVISORY","url":"https://github.com/marmelab/react-admin/security/advisories/GHSA-5jcr-82fh-339v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-25572"},{"type":"FIX","url":"https://github.com/marmelab/react-admin/pull/8644"},{"type":"FIX","url":"https://github.com/marmelab/react-admin/pull/8645"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/marmelab/react-admin","events":[{"introduced":"712c2f2ad48f90270567c49e662c0f4d03551268"},{"fixed":"ebe2e35320bb6882f6adba7831f4799809a11f28"},{"fixed":"d295fc971a11cb13174405a50b08826d0de22e67"}],"database_specific":{"source":["CPE_RANGE","REFERENCES"],"cpe":["cpe:2.3:a:marmelab:ra-ui-materialui:*:*:*:*:*:node.js:*:*","cpe:2.3:a:marmelab:react-admin:*:*:*:*:*:node.js:*:*"],"extracted_events":[{"introduced":"4.0.0"},{"fixed":"4.7.6"}]}}],"versions":["v4.7.5","v4.7.4","v4.7.3","v4.7.2","v4.7.1","v4.7.0","v4.6.3","v4.6.2","v4.6.1","v4.6.0","v4.5.4","v4.5.3","v4.5.2","v4.5.1","v4.5.0","v4.4.4","v4.4.3","v4.4.2","v4.4.1","v4.4.0","v4.3.4","v4.3.3","v4.3.2","v4.3.1","v4.3.0","v4.2.2","v4.2.1","v4.2.0","v4.0.1","v4.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-25572.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"}]}