Skip to main content

Recon ng: Mistune TOC Anchor Injection XSS (CVE-2026-44898)

0
Medium
Published: 08/13/2026 (08/13/2026, 17:32:25 UTC)
Source: GCVE Database
Product: recon-ng

Description

CVE-2026-44898 is a cross-site scripting (XSS) vulnerability in the render_toc_ul() function of the Mistune TOC component used by recon-ng. The vulnerability arises because heading IDs and text are inserted into HTML anchor tags without proper escaping. When heading IDs are derived from user-supplied text, an attacker can inject arbitrary HTML and script code into the table of contents, leading to XSS. This affects recon-ng versions >=5.1.1_1 and <5.1.2_4. A patch is available to fix 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
recon-ng
pkg:brew/recon-ng
Affected versions
>=5.1.1_1 <5.1.2_4

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: 10/10/2026, 21:39:28 UTC

Technical Analysis

The vulnerability exists in the render_toc_ul() function in Mistune's toc.py, where the function builds a table-of-contents unordered list by formatting heading IDs and text directly into anchor tags without escaping. Specifically, the heading ID (used as href fragment) and the visible link text are inserted via Python string formatting without HTML escaping. If the heading ID is derived from user input (e.g., using a slug-based heading_id callback), an attacker can craft a heading that breaks out of the href attribute and injects malicious HTML and JavaScript, resulting in a stored XSS vulnerability in the rendered TOC. This vulnerability is related to another unescaped heading ID issue (H2). The vulnerability affects recon-ng versions >=5.1.1_1 and <5.1.2_4. The CVSS 3.1 score is 6.1 (Medium), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, scope changed, and low impact on confidentiality and integrity.

Potential Impact

An attacker can inject arbitrary HTML and JavaScript into the table of contents rendered by recon-ng's documentation or markdown output, leading to cross-site scripting (XSS). This can allow execution of malicious scripts in the context of users viewing the affected TOC, potentially leading to session theft or other client-side attacks. The impact is limited to confidentiality and integrity with no availability impact. The vulnerability requires user interaction and can be exploited remotely without privileges.

Mitigation Recommendations

A patch is available for recon-ng versions >=5.1.1_1 and <5.1.2_4 that properly escapes heading IDs and text before inserting them into HTML anchor tags. Users should upgrade to version 5.1.2_4 or later to remediate this vulnerability. Until patched, avoid using untrusted input for heading IDs or disable custom heading_id callbacks that return raw user input. No other vendor advisory states that no action is required.

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-recon-ng-CVE-2026-44898
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6acaadae2cdf04f65651477a

Added to database: 10/10/2026, 21:27:10 UTC

Last enriched: 10/10/2026, 21:39:28 UTC

Last updated: 10/10/2026, 21:39:28 UTC

Views: 6

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