{
  "schema_version": "1.7.0",
  "id": "MGASA-2026-0254",
  "published": "2026-07-15T17:33:12Z",
  "modified": "2026-07-15T16:29:03Z",
  "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 <ul> table-of-contents tree\nfrom a list of (level, id, text) tuples. Both the id value (used as\nhref=\"#<id>\") and the text value (used as the visible link label) are\ninserted into <a> 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<script> 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",
  "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": {
        "ecosystem": "Mageia:10",
        "name": "python-mistune",
        "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"
      }
    }
  ],
  "credits": [
    {
      "name": "Mageia",
      "type": "COORDINATOR",
      "contact": [
        "https://wiki.mageia.org/en/Packages_Security_Team"
      ]
    }
  ]
}
