CVE-2018-5773
MEDIUM6.1EPSS 0.36%markdown2 is vulnerable to cross-site scripting
Published: 7/12/2018Modified: 9/30/2024
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.
Affected packages (2)
- PyPI/markdown2from 0, < 2.3.6
- PyPI/markdown2from 0, < 2.3.6
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| osv | CVSS 3.1 | MEDIUM6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
References (9)
- ADVISORYhttps://github.com/advisories/GHSA-p6h9-gw49-rqm4
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2018-5773
- PATCHhttps://github.com/trentm/python-markdown2
- WEBhttps://github.com/google/osv/issues/430
- WEBhttps://github.com/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml
- WEBhttps://github.com/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-236
- WEBhttps://github.com/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323
- WEBhttps://github.com/trentm/python-markdown2/issues/285
- WEBhttps://github.com/trentm/python-markdown2/pull/303