An issue was discovered in markdown2 (aka python-markdown2) through 2.3.5.
Priority LOW 29CWE-79Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.0 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
EPSS 0.00819 57th percentileScored 2026-11-07
Fix Fixed markdown2 (PyPI): 2.3.6
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | markdown2 (PyPI) | before 2.3.6 | 2.3.6 | Patch available | GHSA-p6h9-gw49-rqm4 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- markdown2 (PyPI) Vendor— Affected before 2.3.6 Fixed in 2.3.6 Patch available GHSA-p6h9-gw49-rqm4
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python-markdown2_project:python-markdown2:*:*:*:*:*:*:*:* | up to 2.3.5 | Vulnerable | Python-markdown2 Project |
- cpe:2.3:a:python-markdown2_project:python-markdown2:*:*:*:*:*:*:*:* Versions up to 2.3.5 Vulnerable ·Python-markdown2 Project
Remediation
- Fix · GHSA-p6h9-gw49-rqm4 markdown2 (PyPI) Fixed in 2.3.6 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2018-5773
- 2026-10-03 Alias added: GHSA-p6h9-gw49-rqm4
References
Advisory 3
Other 6
- https://github.com/google/osv/issues/430
- https://github.com/trentm/python-markdown2/pull/303
- https://github.com/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323
- https://github.com/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml
- https://github.com/trentm/python-markdown2
- https://github.com/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-236
More Python-markdown2 Project Python-markdown2 vulnerabilities
- TI-2020-09556 python-markdown2 through 2.3.8 allows XSS because element names are mishandled unless a… CVSS 3.1MEDIUM 6.1
- TI-2009-03548 python-markdown2 before 1.0.1.14 has multiple cross-site scripting (XSS) issues. CVSS 3.1MEDIUM 6.1
Sources
- CVE-2018-5773 · CVE Program
- CVE-2018-5773 · NVD
- FIRST EPSS
- GHSA-p6h9-gw49-rqm4 · GitHub Advisory Database · CC BY 4.0
- CVE-2018-5773 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences