Live threats

All CVEs / Python-markdown2 Project

CVE-2018-5773Python-markdown2 Project Python-markdown2

Medium 6.1 No auth needed

Priority
52
CVSS 3.0
6.1
EPSS
0.8%
probability of exploitation in 30 days · percentile 54
Auth required
No
Published
Jan 18, 2018
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Python-markdown2.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI markdown2 < 2.3.6 2.3.6 pip install "markdown2>=2.3.6"
PyPI markdown2 < 2.3.6 2.3.6 pip install "markdown2>=2.3.6"

Per OSV / GitHub Advisories (GHSA-p6h9-gw49-rqm4, PYSEC-2018-13). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
python-markdown2_projectpython-markdown2≤ 2.3.5

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.