{"id":"CVE-2026-48591","state":"PUBLISHED","title":"Stored XSS via unescaped HTML attribute values in earmark","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.\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.","publishedAt":"2026-06-17T16:42:37.508Z","updatedAt":"2026-06-18T04:45:59.864Z","severity":{"score":4.8,"label":"Medium","version":"4.0","vector":"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","source":"EEF"},"assigner":"EEF","products":["pragdave earmark"],"affected":[{"vendor":"pragdave","product":"earmark","packageName":"earmark","packageURL":"pkg:hex/earmark","defaultStatus":"unaffected","versions":[{"version":"1.4.1","status":"affected","lessThan":"*","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Earmark.Transform'"],"programFiles":["lib/earmark/transform.ex"],"programRoutines":[{"name":"'Elixir.Earmark.Transform':_make_att1/2"}],"repo":"https://github.com/pragdave/earmark"},{"vendor":"pragdave","product":"earmark","packageName":"pragdave/earmark","packageURL":"pkg:github/pragdave/earmark","defaultStatus":"unaffected","versions":[{"version":"8236a0570bd894b50e360da08131ec3294c20799","status":"affected","lessThan":"*","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Earmark.Transform'"],"programFiles":["lib/earmark/transform.ex"],"programRoutines":[{"name":"'Elixir.Earmark.Transform':_make_att1/2"}],"repo":"https://github.com/pragdave/earmark"}],"references":["https://cna.erlef.org/cves/CVE-2026-48591.html","https://osv.dev/vulnerability/EEF-CVE-2026-48591"],"weaknesses":["CWE-83"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/48xxx/CVE-2026-48591.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-48591","state":"PUBLISHED","datePublished":"2026-06-17T16:42:37.508Z","dateUpdated":"2026-06-18T04:45:59.864Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-05-22T09:36:56.834Z"},"containers":{"cna":{"title":"Stored XSS via unescaped HTML attribute values in earmark","descriptions":[{"lang":"en","value":"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 &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."}],"affected":[{"vendor":"pragdave","product":"earmark","packageName":"earmark","packageURL":"pkg:hex/earmark","defaultStatus":"unaffected","versions":[{"version":"1.4.1","status":"affected","lessThan":"*","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Earmark.Transform'"],"programFiles":["lib/earmark/transform.ex"],"programRoutines":[{"name":"'Elixir.Earmark.Transform':_make_att1/2"}],"repo":"https://github.com/pragdave/earmark"},{"vendor":"pragdave","product":"earmark","packageName":"pragdave/earmark","packageURL":"pkg:github/pragdave/earmark","defaultStatus":"unaffected","versions":[{"version":"8236a0570bd894b50e360da08131ec3294c20799","status":"affected","lessThan":"*","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Earmark.Transform'"],"programFiles":["lib/earmark/transform.ex"],"programRoutines":[{"name":"'Elixir.Earmark.Transform':_make_att1/2"}],"repo":"https://github.com/pragdave/earmark"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-48591.html","tags":["related","third-party-advisory"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-48591","tags":["related"]}],"metrics":[{"cvssV4_0":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":4.8,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","userInteraction":"PASSIVE","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-83","description":"CWE-83 Improper Neutralization of Script in Attributes in a Web Page","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-06-18T04:45:59.864Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*","versionStartIncluding":"1.4.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Robert Dober"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-243","descriptions":[{"lang":"en","value":"CAPEC-243 XSS Targeting HTML Attributes"}]}],"source":{"discovery":"EXTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Migrate to a maintained Markdown library such as <a href=\"https://hex.pm/packages/mdex\">MDEx</a>. The earmark package has been retired on Hex and no patched release will be made.</p>"}],"value":"Migrate 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."}],"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-17T18:25:40.841347Z","id":"CVE-2026-48591","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-17T18:25:55.606Z"}}]}}}