CVE-2018-5773 markdown2 is vulnerable to cross-site scripting
Attackers can execute arbitrary scripts via crafted input when the safe_mode feature is enabled in the markdown2 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-5773?
CVE-2018-5773 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Jan 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
An issue was discovered in markdown2 (aka python-markdown2) through 2.3.5. The safe_mode feature, which is supposed to sanitize user input against XSS, is flawed and does not escape the input properly. With a crafted payload, XSS can be triggered, as demonstrated by omitting the final '>' character from an IMG tag.
Weakness: CWE-79
Which versions are affected by CVE-2018-5773?
3 open source packages ship an affected version, including markdown2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
markdown2 PyPI | All versions | 2.3.6 |
markdown2 PyPI | All versions | 2.3.6 |
markdown2 PyPI | All versions | 2.3.6 |
Products include Python-Markdown2 Project Python-Markdown2.
How do I fix CVE-2018-5773?
Upgrade markdown2 to 2.3.6 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-5773 being exploited?
There is no known exploitation of CVE-2018-5773 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-p6h9-gw49-rqm4, PYSEC-2018-13.