GHSA-9Q5W-79CV-947M
Vulnerability from github – Published: 2021-09-07 23:10 – Updated: 2021-09-07 19:05
VLAI?
Summary
Unsafe defaults in `remark-html`
Details
Impact
The documentation of remark-html has mentioned that it was safe by default. In practise the default was never safe and had to be opted into. This means arbitrary HTML can be passed through leading to potential XSS attacks.
Patches
The problem has been patched in 13.0.2 and 14.0.1: remark-html is now safe by default, and the implementation matches the documentation.
Workarounds
On older affected versions, pass sanitize: true, like so:
- .use(remarkHtml)
+ .use(remarkHtml, {sanitize: true})
References
n/a
For more information
If you have any questions or comments about this advisory:
* Open an issue in remark-html
* Email us at security@unifiedjs.com
Severity ?
10.0 (Critical)
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "remark-html"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "13.0.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "remark-html"
},
"ranges": [
{
"events": [
{
"introduced": "14.0.0"
},
{
"fixed": "14.0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"14.0.0"
]
}
],
"aliases": [
"CVE-2021-39199"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2021-09-07T19:05:40Z",
"nvd_published_at": "2021-09-07T19:15:00Z",
"severity": "CRITICAL"
},
"details": "### Impact\n\nThe documentation of `remark-html` has mentioned that it was safe by default. In practise the default was never safe and had to be opted into. This means arbitrary HTML can be passed through leading to potential XSS attacks.\n\n### Patches\n\nThe problem has been patched in 13.0.2 and 14.0.1: `remark-html` is now safe by default, and the implementation matches the documentation.\n\n### Workarounds\n\nOn older affected versions, pass `sanitize: true`, like so:\n\n```diff\n- .use(remarkHtml)\n+ .use(remarkHtml, {sanitize: true})\n```\n\n### References\n\nn/a\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [`remark-html`](https://github.com/remarkjs/remark-html)\n* Email us at [security@unifiedjs.com](mailto:security@unifiedjs.com)\n",
"id": "GHSA-9q5w-79cv-947m",
"modified": "2021-09-07T19:05:40Z",
"published": "2021-09-07T23:10:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/remarkjs/remark-html/security/advisories/GHSA-9q5w-79cv-947m"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39199"
},
{
"type": "WEB",
"url": "https://github.com/remarkjs/remark-html/commit/b75c9dde582ad87ba498e369c033dc8a350478c1"
},
{
"type": "PACKAGE",
"url": "https://github.com/remarkjs/remark-html"
},
{
"type": "WEB",
"url": "https://github.com/remarkjs/remark-html/releases/tag/14.0.1"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/package/remark-html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Unsafe defaults in `remark-html`"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
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…
Loading…