Skip to main content

Adr viewer: Mistune Heading ID Attribute has Injection XSS (CVE-2026-44897)

0
Medium
Published: 08/13/2026 (08/13/2026, 16:35:11 UTC)
Source: GCVE Database
Product: adr-viewer

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected software

Homebrewmore threats →ghsa
adr-viewer
pkg:brew/adr-viewer
Affected versions
>=1.3.0 <1.4.0_5

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

AILast updated: 09/18/2026, 01:36:12 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses