CVE-2026-48591
Received Received - Intake
BaseFortify

Publication date: 2026-06-17

Last updated on: 2026-06-17

Assigner: EEF

Description
Improper Neutralization of Script in Attributes in a Web Page vulnerability in pragdave earmark allows stored cross-site scripting via unescaped HTML attribute values. 'Elixir.Earmark.Transform':_make_att1/2 in lib/earmark/transform.ex splices attribute values verbatim between two literal " bytes: [" ", name, "=\"", value, "\""]. Text nodes are routed through the existing escape function which encodes " as &quot;, but attribute values never visit that path. A markdown link whose URL or title contains a bare " closes the attribute early and lets the trailing bytes be parsed by the browser as fresh HTML attributes. For example, [click](http://example.com/?a=x" onerror="alert(1)) renders as <a href="http://example.com/?a=x" onerror="alert(1)">click</a>, executing arbitrary JavaScript in the victim's browser. The earmark library is no longer maintained and has been retired on Hex. No patched version will be released. All releases from 1.4.1 onward are affected, and users should migrate to a maintained Markdown library such as MDEx. This issue affects earmark from 1.4.1 onward.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-17
Last Modified
2026-06-17
Generated
2026-06-18
AI Q&A
2026-06-17
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
pragdave earmark From 1.4.1 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-83 The product does not neutralize or incorrectly neutralizes "javascript:" or other URIs from dangerous attributes within tags, such as onmouseover, onload, onerror, or style.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-48591 is a stored cross-site scripting (XSS) vulnerability in the earmark library, an Erlang-based Markdown processor.

The issue arises from improper neutralization of script in HTML attributes, allowing stored XSS via unescaped attribute values.

Specifically, the vulnerability occurs in the _make_att1/2 function where attribute values are inserted verbatim without escaping double quotes ("). This allows an attacker to craft a Markdown link with a URL or title containing a bare double quote, which prematurely closes the attribute and lets the browser parse trailing bytes as new HTML attributes, such as onerror, enabling execution of arbitrary JavaScript in the victim's browser.

The earmark library is no longer maintained, no patched version will be released, and all versions from 1.4.1 onward are affected.

Compliance Impact

This vulnerability allows stored cross-site scripting (XSS) attacks via unescaped HTML attribute values, which can lead to the execution of arbitrary JavaScript in a victim's browser.

Such XSS vulnerabilities can compromise the confidentiality and integrity of user data, potentially leading to unauthorized access or data leakage.

Consequently, this may impact compliance with data protection regulations like GDPR and HIPAA, which require safeguarding personal and sensitive information against unauthorized access and ensuring secure processing.

Organizations using the affected earmark library should consider migrating to a maintained Markdown library to mitigate this risk and maintain compliance.

Impact Analysis

This vulnerability can allow attackers to execute arbitrary JavaScript code in the browsers of users who view the affected Markdown content.

Such execution can lead to theft of user credentials, session hijacking, defacement, or other malicious actions depending on the attacker's intent.

Because the vulnerability is stored XSS, the malicious script can persist in the system and affect multiple users over time.

Detection Guidance

This vulnerability involves stored cross-site scripting (XSS) via unescaped HTML attribute values in the earmark Markdown processor. Detection involves identifying Markdown content processed by earmark versions 1.4.1 and later that contain URLs or titles with unescaped double quotes (").

To detect exploitation attempts or vulnerable content, you can search your system or network logs for suspicious Markdown links containing double quotes in URLs or titles that could prematurely close HTML attributes.

  • Use grep or similar tools to scan Markdown files or stored content for patterns like: \" onerror=\" or other suspicious attribute injections.
  • Example command to find suspicious Markdown links in files: grep -r '\" onerror=\"' /path/to/markdown/files
  • Monitor web server logs for requests containing encoded payloads with double quotes and event handlers, e.g., %22 onerror=%22.
Mitigation Strategies

The earmark library is no longer maintained and no patched version will be released. Immediate mitigation involves migrating away from earmark to a maintained Markdown library such as MDEx.

Until migration is complete, avoid processing untrusted Markdown content with vulnerable versions of earmark (1.4.1 and later).

  • Audit and sanitize all Markdown input to ensure it does not contain unescaped double quotes in URLs or titles.
  • Implement Content Security Policy (CSP) headers to reduce the impact of potential XSS attacks.
  • Review and restrict user input permissions to limit the ability to inject malicious Markdown.
Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-48591. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart