{"affected":[{"package":{"ecosystem":"Hex","name":"earmark","purl":"pkg:hex/earmark"},"ranges":[{"events":[{"introduced":"1.4.1"}],"type":"SEMVER"}],"versions":["1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.4.6","1.4.7","1.4.8","1.4.9","1.4.10","1.4.12","1.4.13","1.4.14","1.4.15","1.4.16-pre","1.4.16-pre1","1.4.16-pre2","1.4.16","1.4.17","1.4.18","1.4.19","1.4.20","1.4.21","1.4.22","1.4.23","1.4.24","1.4.25","1.4.26","1.4.27","1.4.28","1.4.29","1.4.30","1.4.31","1.4.32","1.4.33","1.4.34","1.4.35","1.4.36","1.4.37","1.4.38","1.4.39","1.4.40","1.4.41","1.4.42","1.4.43","1.4.44","1.4.45","1.4.46","1.4.47","1.4.48","1.4.49","1.5.0-pre","1.5.0-pre1"]},{"ranges":[{"events":[{"introduced":"8236a0570bd894b50e360da08131ec3294c20799"}],"repo":"https://github.com/pragdave/earmark","type":"GIT"}]}],"aliases":["CVE-2026-48591"],"credits":[{"name":"Peter Ullrich","type":"FINDER"},{"name":"Robert Dober","type":"REMEDIATION_DEVELOPER"},{"name":"Jonatan Männchen / EEF","type":"ANALYST"}],"database_specific":{"capec_ids":["CAPEC-243"],"cpe_ids":["cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-83"]},"details":"## Summary\n\nImproper 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 &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.\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.\n\n## Workaround\n\nMigrate to a maintained Markdown library such as MDEx (https://hex.pm/packages/mdex). The earmark package has been retired on Hex and no patched release will be made.","id":"EEF-CVE-2026-48591","modified":"2026-06-17T16:42:37.508Z","published":"2026-06-17T16:42:37.508Z","references":[{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-48591.html"},{"type":"PACKAGE","url":"https://hex.pm/packages/earmark"}],"related":[],"schema_version":"1.7.3","severity":[{"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","type":"CVSS_V4"}],"summary":"Stored XSS via unescaped HTML attribute values in earmark","upstream":[]}