CVE-2016-10531 Sanitization bypass using HTML Entities in marked
Attackers can bypass sanitization to inject JavaScript URLs, enabling cross-site scripting attacks in applications using the marked library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2016-10531?
CVE-2016-10531 is a medium-severity cross-site scripting vulnerability in HackerOne marked node module, published on 31 May 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
marked is an application that is meant to parse and compile markdown. Due to the way that marked 0.3.5 and earlier parses input, specifically HTML entities, it's possible to bypass marked's content injection protection (`sanitize: true`) to inject a `javascript:` URL. This flaw exists because `&#xNNanything;` gets parsed to what it could and leaves the rest behind, resulting in just `anything;` being left.
Weakness: CWE-79
Which versions are affected by CVE-2016-10531?
2 open source packages ship an affected version, including marked. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
marked npm | All versions | 0.3.6 |
marked npm | All versions | 0.3.6 |
Products include Marked Project Marked.
How do I fix CVE-2016-10531?
Upgrade marked to 0.3.6 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2016-10531 being exploited?
There is no known exploitation of CVE-2016-10531 in the wild and no public exploit code.
Other vulnerabilities in HackerOne marked node module
- CVE-2026-41680 Marked: OOM Denial of Service via Infinite Recursion in marked Tokenizer
- CVE-2017-16114 Regular Expression Denial of Service in marked
- CVE-2018-25110 Regular Expression Denial of Service (ReDoS) in markedjs/marked
- CVE-2014-3743 Multiple Content Injection Vulnerabilities in marked
- CVE-2017-1000427 Marked vulnerable to XSS from data URIs
Sources
Also known as CVE-2016-1000013, DEBIAN-CVE-2016-10531, GHSA-vfvf-mqq8-rwqc, UBUNTU-CVE-2016-10531.