CVE-2018-5773 json
markdown2 is vulnerable to cross-site scripting
published 2018-01-18 8 y ago modified 2026-06-17 4 mo ago also GHSA-p6h9-gw49-rqm4 , PYSEC-2018-13 , EUVD-2018-0089
- cvss
- 6.1
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 57%
- public exploits
- 0
- none known
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.
Patch / fix
- pypi markdown2 2.3.6
- python-markdown2 openSUSE Tumbleweed 2.5.5-1.3
- python-markdown2 openSUSE Tumbleweed 2.4.13-1.2
- python-markdown2 openSUSE Tumbleweed 2.4.0-2.4
opensuse advisories openSUSE-SU-2026:12016-1openSUSE-SU-2024:14146-1openSUSE-SU-2024:11237-1
- github.com/trentm/python-markdown2@1b1dcdd commit
- github.com/trentm/python-markdown2#303 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-5773 updated cvss 8.0
python-markdown2: Unsanitized input in markdown() method allows for cross-site scripting (XSS)
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.82% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.0 | 6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | markdown2 | <2.3.6 |
2.3.6 |
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/trentm/python-markdown2/pull/303
web
-
github.com
/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323
web
-
github.com
/trentm/python-markdown2/issues/285
web, third-party-advisory, report
-
nvd.nist.gov
/vuln/detail/CVE-2018-5773
advisory
-
github.com
/google/osv/issues/430
web
-
github.com
/advisories/GHSA-p6h9-gw49-rqm4
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml
web
-
github.com
/trentm/python-markdown2
package
-
github.com
/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-236
web
Sources
- CVE List CVE-2018-5773
- GitHub Advisory GHSA-p6h9-gw49-rqm4
- NVD CVE-2018-5773
- OSV PYSEC-2018-13
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.