CVE-2026-48591
MEDIUM 4.8CVSS 4.0Stored XSS via unescaped HTML attribute values in earmark
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.
- Published
- 17 Jun 2026
- Last modified
- 26 Nov 2026
- Assigned by
- 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
- NVD status
- Deferred
- Weakness
- CWE-79CWE-83
- Also known as
- EEF-CVE-2026-48591GHSA-52mm-h59v-f3c7
- Sources
- NVDJSONCVE ListJSONOSV EEF-CVE-2026-48591JSONOSV GHSA-52mm-h59v-f3c7JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db (Secondary) | CVSS 4.0 | MEDIUM 4.8 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CVE List | EEF | CVSS 4.0 | MEDIUM 4.8 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| CVE List | CISA-ADP | SSVC | Exploitation: none; Automatable: no; Technical Impact: partial |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| CVE List | https://repo.hex.pm | earmarkcpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:* |
>= 1.4.1 | |
| CVE List | https://github.com | pragdave/earmarkcpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:* |
>= 8236a0570bd894b50e360da08131ec3294c20799 | |
| OSV | Hex | earmark | >= 1.4.1 | |
| OSV | Hex | earmark | >= 1.4.1, <= 1.5.0-pre1 |
References
- https://cna.erlef.org/cves/CVE-2026-48591.html · related, third-party-advisory, WEB
- https://github.com/pragdave/earmark/commit/8236a0570bd894b50e360da08131ec3294c20799 · related, WEB
- https://osv.dev/vulnerability/EEF-CVE-2026-48591 · related, WEB
- https://hex.pm/packages/earmark · PACKAGE
- https://nvd.nist.gov/vuln/detail/CVE-2026-48591 · ADVISORY
- https://github.com/pragdave/earmark · PACKAGE
History
- 26 Nov 2026 18:37 UTC · OSV: updated (other details)
- 25 Nov 2026 20:55 UTC · CVE List: first stored (published 17 Jun 2026)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 17 Jun 2026)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 17 Jun 2026)
- 25 Nov 2026 20:10 UTC · NVD: first stored (published 17 Jun 2026)