CVE-2026-54889: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in leandrocp mdex
Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output. 'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta "link" or "image" attribute without applying a scheme allowlist or any normalization. An attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an <a href> or <img src>, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in <img src> generally does not execute in modern browsers. This issue affects mdex: from 0.8.3 before 0.13.2.
AI Analysis
Technical Summary
The vulnerability in leandrocp mdex arises from improper neutralization of input during web page generation (CWE-79). Specifically, the function 'Elixir.MDEx.DeltaConverter':default_convert_node/3 copies link, wikilink, or image URLs from Markdown into Quill Delta attributes without applying a scheme allowlist or normalization. An attacker controlling Markdown can embed a javascript: URL that persists into the Delta output. When this Delta is rendered to HTML by downstream renderers or clients, the javascript: scheme executes in the browser, leading to cross-site scripting. The strongest attack vectors are links and wikilinks, as javascript: in href attributes executes on click, while javascript: in image src attributes is less impactful due to modern browser protections. This affects mdex versions starting at 0.8.3 up to but not including 0.13.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of users viewing the rendered content, potentially leading to session theft, user impersonation, or other client-side attacks. The impact is rated medium with a CVSS score of 5.1, reflecting network attack vector, low complexity, no privileges required, user interaction needed, and limited confidentiality and integrity impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, avoid rendering untrusted Markdown content with mdex or ensure that URLs in Markdown are sanitized and validated to disallow javascript: schemes before conversion to Quill Delta.
CVE-2026-54889: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in leandrocp mdex
Description
Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output. 'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta "link" or "image" attribute without applying a scheme allowlist or any normalization. An attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an <a href> or <img src>, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in <img src> generally does not execute in modern browsers. This issue affects mdex: from 0.8.3 before 0.13.2.
CVSS v4.0
Score 5.1medium
Affected software
cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in leandrocp mdex arises from improper neutralization of input during web page generation (CWE-79). Specifically, the function 'Elixir.MDEx.DeltaConverter':default_convert_node/3 copies link, wikilink, or image URLs from Markdown into Quill Delta attributes without applying a scheme allowlist or normalization. An attacker controlling Markdown can embed a javascript: URL that persists into the Delta output. When this Delta is rendered to HTML by downstream renderers or clients, the javascript: scheme executes in the browser, leading to cross-site scripting. The strongest attack vectors are links and wikilinks, as javascript: in href attributes executes on click, while javascript: in image src attributes is less impactful due to modern browser protections. This affects mdex versions starting at 0.8.3 up to but not including 0.13.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of users viewing the rendered content, potentially leading to session theft, user impersonation, or other client-side attacks. The impact is rated medium with a CVSS score of 5.1, reflecting network attack vector, low complexity, no privileges required, user interaction needed, and limited confidentiality and integrity impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, avoid rendering untrusted Markdown content with mdex or ensure that URLs in Markdown are sanitized and validated to disallow javascript: schemes before conversion to Quill Delta.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-06-16T10:47:13.915Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a42c94c27e9c797196503e2
Added to database: 06/29/2026, 19:36:44 UTC
Last enriched: 07/06/2026, 22:43:19 UTC
Last updated: 08/13/2026, 16:22:36 UTC
Views: 85
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.