{"answers":{"affected":"8 open source packages ship an affected version, including react-admin and ra-ui-materialui. It affects 2 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25572 exists.","fix":"Upgrade react-admin to a fixed version for your release line: 3.19.12 or 4.7.6.","what":"CVE-2023-25572 is a medium-severity cross-site scripting vulnerability in marmelab react-admin, published on 13 Feb 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-25572 and fix it if it is affected.\n\nWhat it is: CVE-2023-25572 is a medium-severity cross-site scripting vulnerability in marmelab react-admin, published on 13 Feb 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25572 exists.\n\nAffected packages and fixed versions:\n- react-admin (npm): affected all versions; fixed in 3.19.12\n- react-admin (npm): affected all versions; fixed in 3.19.12\n- react-admin (npm): affected from 4.0.0; fixed in 4.7.6\n- react-admin (npm): affected from 4.0.0; fixed in 4.7.6\n- ra-ui-materialui (npm): affected all versions; fixed in 3.19.12\n- ra-ui-materialui (npm): affected all versions; fixed in 3.19.12\n- ra-ui-materialui (npm): affected from 4.0.0; fixed in 4.7.6\n- ra-ui-materialui (npm): affected from 4.0.0; fixed in 4.7.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-25572/ (Markdown: https://insights.sbomify.com/CVE-2023-25572/index.md)","id":"CVE-2023-25572","markdown":"https://insights.sbomify.com/CVE-2023-25572/index.md","name":"CVE-2023-25572","record":{"aliases":["GHSA-5jcr-82fh-339v"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"React admin framework","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary scripts in browsers via unsanitized HTML in react-admin RichTextField components.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ra-ui-materialui","vendor":"marmelab"},{"product":"react-admin","vendor":"marmelab"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"React-Admin vulnerable to Cross-Site-Scripting attack on `\u003cRichTextField\u003e`","id":"CVE-2023-25572","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":8,"n_references":5,"next":{"headline":"Improper access control to download file in metersphere","id":"CVE-2023-25573"},"packages":[{"ecosystem":"npm","fixed":["3.19.12"],"introduced":["0"],"last_affected":[],"package":"ra-ui-materialui","purl":null,"source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["3.19.12"],"introduced":["0"],"last_affected":[],"package":"ra-ui-materialui","purl":"pkg:npm/ra-ui-materialui","source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["4.7.6"],"introduced":["4.0.0"],"last_affected":[],"package":"ra-ui-materialui","purl":null,"source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["4.7.6"],"introduced":["4.0.0"],"last_affected":[],"package":"ra-ui-materialui","purl":"pkg:npm/ra-ui-materialui","source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["3.19.12"],"introduced":["0"],"last_affected":[],"package":"react-admin","purl":null,"source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["3.19.12"],"introduced":["0"],"last_affected":[],"package":"react-admin","purl":"pkg:npm/react-admin","source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["4.7.6"],"introduced":["4.0.0"],"last_affected":[],"package":"react-admin","purl":null,"source":"GHSA-5jcr-82fh-339v"},{"ecosystem":"npm","fixed":["4.7.6"],"introduced":["4.0.0"],"last_affected":[],"package":"react-admin","purl":"pkg:npm/react-admin","source":"GHSA-5jcr-82fh-339v"}],"prev":{"headline":"Backstage has XSS Vulnerability in Software Catalog","id":"CVE-2023-25571"},"products":["react-admin"],"published":"2023-02-13","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["marmelab"]},"summary":"Attackers can execute arbitrary scripts in browsers via unsanitized HTML in react-admin RichTextField components.","url":"https://insights.sbomify.com/CVE-2023-25572/"}