{"id":"CVE-2019-25781","kind":"vulnerability","aliases":["CVE-2019-25781"],"related":[],"title":"Python-Markdown: unmatched brackets let short input exhaust CPU","description":"Python-Markdown 3.0 through 3.11.2 contains an algorithmic complexity vulnerability in inline link parsing that allows remote attackers to exhaust CPU through unmatched brackets. Attackers can submit short Markdown containing repeated [ or ![ characters, forcing LinkInlineProcessor.getText() and getLink() into quadratic scans that keep workers busy for minutes.","summary":"Python-Markdown versions 3.0 through 3.11.2 parse inline links with a quadratic-time routine, so repeated unmatched brackets take minutes of CPU. A remote attacker can tie up worker processes with a short Markdown message, causing denial of service.","severity":"high","cvss":8.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["markdown","package","python","web-apps"],"not_affected_if":["trusted-input-only"],"how_to_check":"- Run `pip show markdown` or `python -c \"import markdown; print(markdown.__version__)\"` and check whether the version is between `3.0` and `3.11.2`\n- Search requirements files and lock files for `markdown` to find pinned versions","fix":"- Python-Markdown: move to a version newer than `3.11.2` (the sources do not name the exact fixed release)","status":"open","published_at":"2026-10-29T14:17:39+00:00","first_seen_at":"2026-10-29T14:25:22+00:00","triaged_at":"2026-10-29T14:25:51+00:00","updated_at":"2026-10-29T14:25:51+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-29T14:25:51Z","model":"claude-haiku-5-5","output":{"fix":"- Python-Markdown: move to a version newer than `3.11.2` (the sources do not name the exact fixed release)","reach":"network","title":"Python-Markdown: unmatched brackets let short input exhaust CPU","impact":"low","summary":"Python-Markdown versions 3.0 through 3.11.2 parse inline links with a quadratic-time routine, so repeated unmatched brackets take minutes of CPU. A remote attacker can tie up worker processes with a short Markdown message, causing denial of service.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","markdown","web-apps"],"confidence":0.6,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Worker processes stall on crafted input, causing denial of service","analyst_note":"Confirm the fixed version and any default-config conditions from the NVD entry or the upstream Python-Markdown release notes.","how_to_check":"- Run `pip show markdown` or `python -c \"import markdown; print(markdown.__version__)\"` and check whether the version is between `3.0` and `3.11.2`\n- Search requirements files and lock files for `markdown` to find pinned versions","plain_action":"","needs_analyst":true,"not_affected_if":["trusted-input-only"],"who_is_affected":"Any application that passes user-supplied Markdown to Python-Markdown 3.0 through 3.11.2 is exposed, because the attacker only needs to submit text the parser will read. Services that render only trusted, internal Markdown are less exposed. unknown whether the sources list any further configuration that is required.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.000713,"input_tokens":4167,"output_tokens":593,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2019':12A,15A '-25781':13A,16A '3.0':27B,67C '3.11.2':29B,69C 'algorithm':72C 'allow':80C 'app':22B 'attack':49B,82C,89C 'bracket':5A,42B,88C 'busi':108C 'caus':60B 'charact':97C 'complex':73C 'contain':70C,94C 'cpu':10A,46B,85C 'cve':11A,14A 'denial':61B 'exhaust':9A,84C 'forc':98C 'getlink':101C 'inlin':31B,76C 'input':8A 'keep':106C 'let':6A 'link':32B,77C 'linkinlineprocessor.gettext':99C 'markdown':3A,17B,25B,58B,66C,93C 'messag':59B 'minut':44B,110C 'packag':18B 'pars':30B,78C 'process':54B 'python':2A,19B,24B,65C 'python-markdown':1A,23B,64C 'quadrat':36B,103C 'quadratic-tim':35B 'remot':48B,81C 'repeat':40B,95C 'routin':38B 'scan':104C 'servic':63B 'short':7A,57B,92C 'submit':91C 'take':43B 'tie':51B 'time':37B 'unmatch':4A,41B,87C 'version':26B 'vulner':74C 'web':21B 'web-app':20B 'worker':53B,107C","nicknames":[],"mitigations":[],"who_affected":"Any application that passes user-supplied Markdown to Python-Markdown 3.0 through 3.11.2 is exposed, because the attacker only needs to submit text the parser will read. Services that render only trusted, internal Markdown are less exposed. unknown whether the sources list any further configuration that is required.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"unknown","audience":"developers","plain_action":null,"first_public_at":"2026-10-29T14:17:39+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2019-25781","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-25781","severity":null,"published_at":"2026-10-29T14:17:39+00:00","modified_at":"2026-10-29T14:17:39+00:00","first_seen_at":"2026-10-29T14:25:22+00:00","fetched_at":"2026-10-29T14:25:22+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}