CVE-2026-48591
published medium CVSS 4.0 · 4.8Stored XSS via unescaped HTML attribute values in earmark
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pragdave | — | earmark1.4.1 and later · Other versions: unaffected | Affected | Not stated | EEF |
| pragdave | — | pragdave/earmarkearmark · 8236a0570bd894b50e360da08131ec3294c20799 and later · Other versions: unaffected | Affected | Not stated | 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. 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. 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 4.8 / 10
- Severity
- medium
- Provider
- EEF · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pragdave | earmark | 1.4.1 and later (affected · semver)Default: unaffected | EEF · cna |
| pragdave | earmark | 8236a0570bd894b50e360da08131ec3294c20799 and later (affected · git)Default: unaffected | EEF · cna |
Weaknesses
1- CWE-83 CWE-83 Improper Neutralization of Script in Attributes in a Web Page
References
3- EEF CNA record for CVE-2026-48591 https://cna.erlef.org/cves/CVE-2026-48591.html
- Introducing commit 8236a05 in pragdave/earmark https://github.com/pragdave/earmark/commit/8236a0570bd894b50e360da08131ec3294c20799
- OSV record EEF-CVE-2026-48591 https://osv.dev/vulnerability/EEF-CVE-2026-48591
Provider assertions
2EEF · cna
Stored XSS via unescaped HTML attribute values in earmark
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 728ad7c49b39ad646d72b804d1ad8a25ead2583b637d30df927484cfc21ef107
- Ingested
- 25 Nov 2026, 04:42:44 UTC
- Source record
- Official CVE record