CVE-2016-10531: XSS

Published May 31, 2018
·
Updated

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(1) Renders a valid link that when clicked will execute alert(1).

Recommendation

Update to version 0.3.6 or later.

Other sources

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.

Affected Software

2 affected componentsFixes available
npm/marked<0.3.6
0.3.6
Marked Project Marked Node.js<=0.3.5

Event History

May 31, 2018
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
DescriptionWeakness
Feb 18, 2019
Advisory Published
11:58 PM

Frequently Asked Questions

1

What is the severity of CVE-2016-10531?

CVE-2016-10531 is classified as a high severity cross-site scripting vulnerability.

2

How do I fix CVE-2016-10531?

To fix CVE-2016-10531, upgrade the 'marked' package to version 0.3.7 or later.

3

What versions of marked are affected by CVE-2016-10531?

CVE-2016-10531 affects marked versions up to and including 0.3.6.

4

What happens if I do not address CVE-2016-10531?

If left unaddressed, CVE-2016-10531 could allow attackers to execute arbitrary JavaScript in the context of a victim's browser.

5

Does CVE-2016-10531 impact all environments using marked?

CVE-2016-10531 primarily impacts environments configuring marked with 'sanitize:true'.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203