GitHub Advisoryadvisory · PyPI
GHSA-p6h9-gw49-rqm4 markdown2 is vulnerable to cross-site scripting
MEDIUM
Official page ↗
- Aliases
- CVE-2018-5773
- Ecosystem
- PyPI
- Packages
- markdown2
- Severity
- Moderate
- CVSS vector
- CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2020-06-16
Affected packages
• PyPI markdown2: < 2.3.6 → fixed in 2.3.6
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.
Related
Alias · CVE (1)
- CVE-2018-5773 An issue was discovered in markdown2 (aka python-markdown2) through 2.3.5. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2018-5773 advisory
- https://github.com/google/osv/issues/430 web
- https://github.com/trentm/python-markdown2/issues/285 web
- https://github.com/trentm/python-markdown2/pull/303 web
- https://github.com/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323 web
- https://github.com/advisories/GHSA-p6h9-gw49-rqm4 advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml web
- https://github.com/trentm/python-markdown2 package
- https://github.com/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-236 web