GHSA-9q5w-79cv-947m

Suggest an improvement
Source
https://github.com/advisories/GHSA-9q5w-79cv-947m
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/09/GHSA-9q5w-79cv-947m/GHSA-9q5w-79cv-947m.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-9q5w-79cv-947m
Aliases
Related
Published
2021-09-07T23:10:56Z
Modified
2026-01-30T02:52:07.530104Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N CVSS Calculator
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

Database specific
{
    "github_reviewed": true,
    "nvd_published_at": "2021-09-07T19:15:00Z",
    "severity": "CRITICAL",
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed_at": "2021-09-07T19:05:40Z"
}
References

Affected packages

npm / remark-html

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
13.0.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/09/GHSA-9q5w-79cv-947m/GHSA-9q5w-79cv-947m.json"

npm / remark-html

Package

Affected ranges

Type
SEMVER
Events
Introduced
14.0.0
Fixed
14.0.1

Affected versions

14.*
14.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/09/GHSA-9q5w-79cv-947m/GHSA-9q5w-79cv-947m.json"