Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. markdown2
  4. ›
  5. CVE-2018-5773

CVE-2018-5773: markdown2 is vulnerable to cross-site scripting

July 12, 2018 (updated September 30, 2024)

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.

References

  • github.com/advisories/GHSA-p6h9-gw49-rqm4
  • github.com/google/osv/issues/430
  • github.com/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml
  • github.com/trentm/python-markdown2
  • github.com/trentm/python-markdown2/blob/master/CHANGES.md
  • github.com/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323
  • github.com/trentm/python-markdown2/issues/285
  • github.com/trentm/python-markdown2/pull/303
  • nvd.nist.gov/vuln/detail/CVE-2018-5773

Code Behaviors & Features

Detect and mitigate CVE-2018-5773 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.3.6

Fixed versions

  • 2.3.6

Solution

Upgrade to version 2.3.6 or above.

Impact 6.1 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/markdown2/CVE-2018-5773.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:49 +0000.