CVE-2026-48591: earmark Cross-Site Scripting Vulnerability
MODERATECVE-2026-48591 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting earmark libraries in the Hex ecosystem. The issue involves stored xss via unescaped html attribute values. Remediation is available in the latest vendor maintenance releases.
CVE-2026-48591 at a Glance
How to Fix CVE-2026-48591
To remediate this vulnerability, upgrade all affected earmark dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade earmark to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for earmark
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-48591, inspect your project dependencies for earmark:
inspect dependencies for earmark
Analyze the terminal output to locate any version of earmark in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In earmark, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48591 Affected earmark Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
earmark
|
Hex |
≥ 1.4.1
≤ 1.5.0-pre1
|
|
References
Frequently Asked Questions
What is CVE-2026-48591?
Which earmark versions are affected?
What version fixes CVE-2026-48591?
Is earmark affected?
What CWE is associated with CVE-2026-48591?
How can I check Hex dependencies for CVE-2026-48591?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-52mm-h59v-f3c7",
"modified" : "2026-06-18T14:47:16Z",
"published" : "2026-06-17T18:35:58Z",
"aliases" : [ "CVE-2026-48591" ],
"summary" : "earmark: Stored XSS via unescaped HTML attribute values",
"details" : "Improper Neutralization of Script in Attributes in a Web Page vulnerability in pragdave earmark allows stored cross-site scripting via unescaped HTML attribute values.\n\n'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 ", 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.\n\nThe 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.\n\nThis issue affects earmark from 1.4.1 onward.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Hex",
"name" : "earmark"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.4.1"
}, {
"last_affected" : "1.5.0-pre1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48591"
}, {
"type" : "WEB",
"url" : "https://cna.erlef.org/cves/CVE-2026-48591.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pragdave/earmark"
}, {
"type" : "WEB",
"url" : "https://osv.dev/vulnerability/EEF-CVE-2026-48591"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-83" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-18T14:47:16Z",
"nvd_published_at" : "2026-06-17T18:18:04Z"
}
}