MODERATE 6.1

CVE-2016-10531

Sanitization bypass using HTML Entities in marked

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(1)

Renders a valid link that when clicked will execute alert(1).

Recommendation

Update to version 0.3.6 or later.

Affected Maven artifacts (3)

ArtifactAffected versionsFixed in
org.mvnpm » markedvia npm marked
< 0.3.6
0.3.6
org.webjars » markedvia npm marked
< 0.3.6
0.3.6
org.webjars.npm » markedvia npm marked
< 0.3.6
0.3.6

Blast radius

3affected artifacts
8affected versions
16dependent artifacts (est.)
26dependent versions

12% of the dependent artifacts (2) still pull an affected version in their latest release.

DepthDependent versions
Direct
14
2 hops
12

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects npm (1 package) . See all on OSV

References

Advisorynvd.nist.gov
Advisorygithub.com
Webgithub.com
Webgithub.com
Webnpmjs.com