Adr viewer: Mistune Heading ID Attribute has Injection XSS (CVE-2026-44897)
The adr-viewer component of Mistune's HTMLRenderer has a vulnerability (CVE-2026-44897) where the heading ID attribute is inserted into HTML without escaping. This allows an attacker controlling heading text to inject arbitrary HTML attributes, including event handlers, leading to cross-site scripting (XSS). The default behavior uses safe auto-generated IDs, but when a custom heading_id callback returns raw heading text, the vulnerability is triggered. A proof of concept demonstrates injecting a mouseover event that executes JavaScript. A patch is available to address this issue.
AI Analysis
Technical Summary
Mistune's HTMLRenderer.heading() method constructs heading tags by concatenating the id attribute value directly into the HTML without escaping or sanitization. When a custom heading_id callback returns raw heading text containing double quotes, it breaks out of the id attribute, allowing injection of arbitrary attributes such as event handlers. The default TOC hook generates safe numeric IDs, but real-world usage often derives IDs from heading text, making this a practical XSS vector. The vulnerability is confirmed with a proof of concept that injects an onmouseover JavaScript event. The issue affects adr-viewer versions >=1.3.0 and <1.4.0_5. A patch is available.
Potential Impact
An attacker who can control heading text in adr-viewer can inject arbitrary HTML attributes into the heading's id attribute, enabling cross-site scripting (XSS). This can lead to execution of malicious JavaScript in the context of users viewing the rendered content, potentially exposing sensitive information or performing unauthorized actions. The default safe ID generation prevents this, but common usage patterns that derive IDs from user-controlled heading text are vulnerable.
Mitigation Recommendations
A patch is available for adr-viewer to properly escape or sanitize the id attribute value in HTMLRenderer.heading(). Users should update to a fixed version >=1.4.0_5. Avoid using custom heading_id callbacks that return raw heading text without sanitization. If a vendor advisory is available, follow its instructions for upgrading or applying the official fix.
Adr viewer: Mistune Heading ID Attribute has Injection XSS (CVE-2026-44897)
Description
The adr-viewer component of Mistune's HTMLRenderer has a vulnerability (CVE-2026-44897) where the heading ID attribute is inserted into HTML without escaping. This allows an attacker controlling heading text to inject arbitrary HTML attributes, including event handlers, leading to cross-site scripting (XSS). The default behavior uses safe auto-generated IDs, but when a custom heading_id callback returns raw heading text, the vulnerability is triggered. A proof of concept demonstrates injecting a mouseover event that executes JavaScript. A patch is available to address this issue.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mistune's HTMLRenderer.heading() method constructs heading tags by concatenating the id attribute value directly into the HTML without escaping or sanitization. When a custom heading_id callback returns raw heading text containing double quotes, it breaks out of the id attribute, allowing injection of arbitrary attributes such as event handlers. The default TOC hook generates safe numeric IDs, but real-world usage often derives IDs from heading text, making this a practical XSS vector. The vulnerability is confirmed with a proof of concept that injects an onmouseover JavaScript event. The issue affects adr-viewer versions >=1.3.0 and <1.4.0_5. A patch is available.
Potential Impact
An attacker who can control heading text in adr-viewer can inject arbitrary HTML attributes into the heading's id attribute, enabling cross-site scripting (XSS). This can lead to execution of malicious JavaScript in the context of users viewing the rendered content, potentially exposing sensitive information or performing unauthorized actions. The default safe ID generation prevents this, but common usage patterns that derive IDs from user-controlled heading text are vulnerable.
Mitigation Recommendations
A patch is available for adr-viewer to properly escape or sanitize the id attribute value in HTMLRenderer.heading(). Users should update to a fixed version >=1.4.0_5. Avoid using custom heading_id callbacks that return raw heading text without sanitization. If a vendor advisory is available, follow its instructions for upgrading or applying the official fix.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-adr-viewer-CVE-2026-44897
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6aac8e1855bf5e2cf549043c
Added to database: 09/18/2026, 01:04:24 UTC
Last enriched: 09/18/2026, 01:36:12 UTC
Last updated: 09/18/2026, 02:08:49 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.