Lucene search

K
githubGitHub Advisory DatabaseGHSA-9Q5W-79CV-947M
HistorySep 07, 2021 - 11:10 p.m.

Unsafe defaults in `remark-html`

2021-09-0723:10:56
CWE-79
GitHub Advisory Database
github.com
40
remark-html
unsafe defaults
xss attacks
patch
sanitize

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

10

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

EPSS

0.001

Percentile

40.2%

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:

Affected configurations

Vulners
Node
remarkremark-htmlMatch14.0.0node.js
OR
remarkremark-htmlRange<13.0.2node.js
VendorProductVersionCPE
remarkremark-html14.0.0cpe:2.3:a:remark:remark-html:14.0.0:*:*:*:*:node.js:*:*
remarkremark-html*cpe:2.3:a:remark:remark-html:*:*:*:*:*:node.js:*:*

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

10

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

EPSS

0.001

Percentile

40.2%

Related for GHSA-9Q5W-79CV-947M