GHSA-vfvf-mqq8-rwqc
Sanitization bypass using HTML Entities in marked
Quick fix
GHSA-vfvf-mqq8-rwqc — marked: upgrade to the fixed version with the command below.
npm install marked@0.3.6Details
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֍ocument;alert(1) ``` Renders a valid link that when clicked will execute `alert(1)`.
## Recommendation
Update to version 0.3.6 or later.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/marked"]}'