remark-html
Affected
- introduced
0, fixed13.0.2(semver)
Fixed versions
13.0.2
Fix
- Fixed version
13.0.2npm install [email protected]
Advisory
Also known as: CVE-2021-39199
Unsafe defaults in remark-html
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:
Critical Basis: The source's own band: CRITICAL
0, fixed 13.0.2 (semver)13.0.2
13.0.2npm install [email protected]14.0.0, fixed 14.0.1 (semver)14.0.1
14.0.1npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0