CVE-2018-1000162 Cross-site Scripting in Parsedown
Attackers can execute JavaScript via crafted markdown in Parsedown due to improper HTML escaping, affecting applications using this 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-2018-1000162?
CVE-2018-1000162 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Apr 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
Parsedown version prior to 1.7.0 contains a Cross Site Scripting (XSS) vulnerability in `setMarkupEscaped` for escaping HTML that can result in JavaScript code execution. This attack appears to be exploitable via specially crafted markdown that allows it to side step HTML escaping by breaking AST boundaries. This vulnerability appears to have been fixed in 1.7.0 and later.
Weakness: CWE-79
Which versions are affected by CVE-2018-1000162?
2 open source packages ship an affected version, including erusev/parsedown. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
erusev/parsedown Packagist | All versions | 1.7.0 |
erusev/parsedown Packagist | All versions | 1.7.0 |
Products include Parsedown Parsedown.
How do I fix CVE-2018-1000162?
Upgrade erusev/parsedown to 1.7.0 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-2018-1000162 being exploited?
There is no known exploitation of CVE-2018-1000162 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as CLSA-2026-1790249242, GHSA-qgpv-86r3-87fh.