GitHub Advisoryadvisory · npm

GHSA-vfvf-mqq8-rwqc Sanitization bypass using HTML Entities in marked

MEDIUM Published 2019-02-18 Modified 2023-09-07 Official page ↗
Aliases
CVE-2016-10531
Ecosystem
npm
Packages
marked
Severity
Moderate
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2020-06-16

Affected packages

• npm marked: < 0.3.6 → fixed in 0.3.6

Description

Affected versions of `marked` are susceptible to a cross-site scripting vulnerability in link components when `sanitize:true` is configured. Proof of Concept This flaw exists because link URIs containing HTML entities get processed in an abnormal manner. Any HTML Entities get parsed on a best-effort basis and included in the resulting link, while if that parsing fails that character is omitted. For example: A link URI such as ``` javascript&#x58document;alert&#40;1&#41; ``` Renders a valid link that when clicked will execute `alert(1)`. Recommendation Update to version 0.3.6 or later.

Related

Alias · CVE (1)

  • CVE-2016-10531 marked is an application that is meant to parse and compile markdown. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References