Skip to content
Heist/ feed
Back to feed
Medium

mistune, mistune0 — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-44897

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, HTMLRenderer.heading() builds the opening tag by string-concatenating the id attribute value directly into the HTML — with no call to escape(), safe_entity(), or any other sanitisation function. A double-quote character " in the id value terminates the attribute, allowing an attacker to inject arbitrary additional attributes (event handlers, src=, href=, etc.) into the heading element. This vulnerability is fixed in 3.2.1.

Products
mistune, mistune0
Affected versions
0.6-2, 0.7.1-1, 0.7.4-1, 0.8-1, 0.8.1-1, 0.8.3-2, 0.8.4-1, 0.8.4-2, 0.8.4-4, 0.8.4-5, 0.8.4-6, 2.0.0-1+really0.8.4-1, 2.0.4-2, 3.0.2-1, 3.0.2-2, 3.1.3-1, 3.1.4-1
Fixed versions
Not specified
CVEs
CVE-2026-44897
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:13 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-44897

core-osv · Original source

Published 26 May 2026, 21:16 UTC

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, HTMLRenderer.heading() builds the opening tag by string-concatenating the id attribute value directly into the HTML — with no call to escape(), safe_entity(), or any other sanitisation function. A double-quote character " in the id value terminates the attribute, allowing an attacker to inject arbitrary additional attributes (event handlers, src=, href=, etc.) into the heading element. This vulnerability is fixed in 3.2.1.

osv:UBUNTU-CVE-2026-44897

mistune

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune0

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune0

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune0

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune0

Fixed versions: Not specified

mistune

Fixed versions: Not specified

mistune0

Fixed versions: Not specified

Complete source record
{
  "id": "872184f3ba023e4c1c26b789f740d19dca5585c5696ddf6a5e8e2b4e56e2f863",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-44897",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-44897",
    "summary": "Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, HTMLRenderer.heading() builds the opening tag by string-concatenating the id attribute value directly into the HTML — with no call to escape(), safe_entity(), or any other sanitisation function. A double-quote character \" in the id value terminates the attribute, allowing an attacker to inject arbitrary additional attributes (event handlers, src=, href=, etc.) into the heading element. This vulnerability is fixed in 3.2.1.",
    "evidence": "osv:UBUNTU-CVE-2026-44897",
    "products": [
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.6-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.7.1-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.7.4-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.8-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.8.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.8.3-2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.8.4-2",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-4",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "0.8.4-5",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.0.0-1+really0.8.4-1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune0",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "0.8.4-2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.0.4-2",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "3.0.2-1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune0",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-2",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.0.2-2",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "3.1.3-1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune0",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-4",
            "evidence": "/affected/8/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.4-1",
            "evidence": "/affected/9/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune0",
          "evidence": "/affected/10/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-6",
            "evidence": "/affected/10/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune",
          "evidence": "/affected/11/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.3-1",
            "evidence": "/affected/11/versions"
          },
          {
            "value": "3.1.4-1",
            "evidence": "/affected/11/versions"
          }
        ]
      },
      {
        "name": {
          "value": "mistune0",
          "evidence": "/affected/12/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.8.4-4",
            "evidence": "/affected/12/versions"
          },
          {
            "value": "0.8.4-5",
            "evidence": "/affected/12/versions"
          },
          {
            "value": "0.8.4-6",
            "evidence": "/affected/12/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-44897",
      "aliases": [
        "UBUNTU-CVE-2026-44897"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "0.6-2",
            "0.7.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-mistune",
                "binary_version": "0.7.1-1"
              },
              {
                "binary_name": "python3-mistune",
                "binary_version": "0.7.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "0.7.4-1",
            "0.8-1",
            "0.8.1-1",
            "0.8.3-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-mistune",
                "binary_version": "0.8.3-2"
              },
              {
                "binary_name": "python3-mistune",
                "binary_version": "0.8.3-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "0.8.4-1",
            "0.8.4-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "0.8.4-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "0.8.4-4",
            "0.8.4-5",
            "2.0.0-1+really0.8.4-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "2.0.0-1+really0.8.4-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune0",
            "purl": "pkg:deb/ubuntu/mistune0?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "0.8.4-1",
            "0.8.4-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune0",
                "binary_version": "0.8.4-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.0.4-2",
            "3.0.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "3.0.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune0",
            "purl": "pkg:deb/ubuntu/mistune0?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "0.8.4-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune0",
                "binary_version": "0.8.4-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "3.0.2-2",
            "3.1.3-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "3.1.3-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune0",
            "purl": "pkg:deb/ubuntu/mistune0?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.8.4-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune0",
                "binary_version": "0.8.4-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "3.1.4-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "3.1.4-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune0",
            "purl": "pkg:deb/ubuntu/mistune0?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.8.4-6"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune0",
                "binary_version": "0.8.4-6"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune",
            "purl": "pkg:deb/ubuntu/mistune?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "3.1.3-1",
            "3.1.4-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune",
                "binary_version": "3.1.4-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "mistune0",
            "purl": "pkg:deb/ubuntu/mistune0?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.8.4-4",
            "0.8.4-5",
            "0.8.4-6"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-44897.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-mistune0",
                "binary_version": "0.8.4-6"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:21.204294782Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-44897"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-44897",
        "https://www.cve.org/CVERecord?id=CVE-2026-44897",
        "https://github.com/lepture/mistune/releases/tag/v3.2.1",
        "https://github.com/lepture/mistune/security/advisories/GHSA-v87v-83h2-53w7"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-44897",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 358593,
  "published_at": "2026-05-26T21:16:00+00:00"
}