{"items":[{"id":"NVI-00018281","kind":"vulnerability","title":"Mistune Heading ID Attribute has Injection XSS","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-v87v-83h2-53w7","CVE-2026-44897"],"plain_summary":"GitHub lists this reviewed advisory for mistune. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-054dfd96633e00f9794acda0caf7f561"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-06-08T23:30:26.000Z","value":"6.1 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-054dfd96633e00f9794acda0caf7f561"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-054dfd96633e00f9794acda0caf7f561","url":"https://github.com/advisories/GHSA-v87v-83h2-53w7","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-v87v-83h2-53w7","publisher":"GitHub Advisory Database","observed_at":"2026-11-07T00:50:36.189Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-054dfd96633e00f9794acda0caf7f561"],"technology":"mistune","known_exclusions":[],"conditions_summary":"## Summary\n`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.\n\nThe default TOC hook assigns safe auto-incremented IDs (`toc_1`, `toc_2`, …) that never contain user text. However, the `add_toc_hook()` API accepts a caller-supplied `heading_id` callback. Deriving heading IDs from the heading text itself — to produce human-readable slug anchors like `#installation` or `#getting-started` — is by far the most common real-world usage of this callback (every major documentation generator does this). When the callback returns raw heading text, an attacker who controls heading content can break out of the `id=` attribute.\n\n## Details\n**File:** `src/mistune/renderers/html.py`\n\n```python\ndef heading(self, text: str, level: int, **attrs: Any) -> str:\n    tag = \"h\" + str(level)\n    html = \"<\" + tag\n    _id = attrs.get(\"id\")\n    if _id:\n    ","public_affected_ranges":["<= 3.2.0"]}],"null_published_at":"2026-11-07T07:07:39.800Z","source_updated_at":"2026-06-08T23:30:26.000Z","source_disclosed_at":"2026-05-09T00:13:12.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-07T00:50:36.189Z"}],"next_cursor":null,"snapshot_revision":"42594"}