Sanitization bypass using HTML Entities in marked
Moderate severity
GitHub Reviewed
Published
Feb 18, 2019
to the GitHub Advisory Database
•
Updated Sep 7, 2023
Description
Published to the GitHub Advisory Database
Feb 18, 2019
Reviewed
Jun 16, 2020
Last updated
Sep 7, 2023
Affected versions of
marked
are susceptible to a cross-site scripting vulnerability in link components whensanitize: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
Renders a valid link that when clicked will execute
alert(1)
.Recommendation
Update to version 0.3.6 or later.
References