{"id":"MGASA-2026-0254","summary":"Updated python-mistune package fixes security vulnerabilities","details":"The updated python-mistune package fixes two security vulnerablities:\nPrior to 3.2.1, render_toc_ul() builds a \u003cul\u003e table-of-contents tree\nfrom a list of (level, id, text) tuples. Both the id value (used as\nhref=\"#\u003cid\u003e\") and the text value (used as the visible link label) are\ninserted into \u003ca\u003e tags via a plain Python format string — with no HTML\nescaping applied to either value. When heading IDs are derived from\nuser-supplied heading text (the standard use-case for readable slug\nanchors), an attacker can craft a heading whose text breaks out of the\nhref=\"#...\" attribute context, injecting arbitrary HTML tags including\n\u003cscript\u003e blocks directly into the rendered TOC. (CVE-44898)\nPrior to 3.3.0, Mistune is vulnerable to a CPU exhaustion DoS due to\nsuperlinear (approximately O(n²)) behavior in parse_link_text. When\nparsing Markdown containing many consecutive [ characters,\nparse_link_text repeatedly scans the input using a regex search inside a\nloop. Each iteration re-scans a large portion of the remaining string,\nresulting in quadratic-time behavior. An attacker-controlled Markdown\ninput can therefore trigger excessive CPU usage with a very small\npayload. (CVE-2026-49851)\n","modified":"2026-07-15T17:45:05.087174308Z","published":"2026-07-15T17:33:12Z","upstream":["CVE-2026-44898","CVE-2026-49851"],"references":[{"type":"ADVISORY","url":"https://advisories.mageia.org/MGASA-2026-0254.html"},{"type":"REPORT","url":"https://bugs.mageia.org/show_bug.cgi?id=35773"},{"type":"WEB","url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/message/W4DK3F2DIMTLJEXWFR5UC6EJVGR7KNR5/"},{"type":"ADVISORY","url":"https://github.com/lepture/mistune/security/advisories/GHSA-qcq2-496w-v96p"}],"affected":[{"package":{"name":"python-mistune","ecosystem":"Mageia:10","purl":"pkg:rpm/mageia/python-mistune?arch=source&distro=mageia-10"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.2-1.mga10"}]}],"ecosystem_specific":{"section":"core"},"database_specific":{"source":"https://advisories.mageia.org/MGASA-2026-0254.json"}}],"schema_version":"1.7.5","credits":[{"name":"Mageia","contact":["https://wiki.mageia.org/en/Packages_Security_Team"],"type":"COORDINATOR"}]}