{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2018-5773","id":"CVE-2018-5773","title":"markdown2 is vulnerable to cross-site scripting","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.","descriptionLong":"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.","published":"2018-01-18T21:00:00.000Z","updated":"2026-10-20T10:50:28.963473553Z","reserved":"2018-01-18T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"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","rating":"medium","source":"GitHub"},{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.0","score":6.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"markdown2","purl":"pkg:pypi/markdown2","ranges":["<2.3.6"],"fixed":["2.3.6"],"advisory":"GHSA-p6h9-gw49-rqm4"}],"cwes":["CWE-79"],"aliases":["GHSA-p6h9-gw49-rqm4","PYSEC-2018-13"],"references":[{"url":"https://github.com/trentm/python-markdown2/issues/285","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5773","tags":["advisory"]},{"url":"https://github.com/google/osv/issues/430","tags":["web"]},{"url":"https://github.com/trentm/python-markdown2/pull/303","tags":["web"]},{"url":"https://github.com/trentm/python-markdown2/commit/1b1dcdd727c0ef03453b9f5ef5ae3679f1d72323","tags":["web"]},{"url":"https://github.com/advisories/GHSA-p6h9-gw49-rqm4","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/markdown2/PYSEC-2018-13.yaml","tags":["web"]},{"url":"https://github.com/trentm/python-markdown2","tags":["package"]},{"url":"https://github.com/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-236","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00819,"epssPercentile":0.5791,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2018-5773","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5773","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2018-5773","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-p6h9-gw49-rqm4","ok":true,"note":"GHSA-p6h9-gw49-rqm4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2018-5773","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}