Cross-Site Scripting (XSS) in earmark
Summary
Cross-site scripting in earmark (CVE-2026-48591). Risk of unauthorized operations or information disclosure.
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-48591 has been found in earmark.
Risk of unauthorized operations or information disclosure.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "earmark CVE-2026-48591" on the vendor's site.
CVE-2026-48591 (earmark) — CWE-79
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in earmark.
Check the vendor advisory for the affected versions of earmark.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'earmark' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'earmark' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
earmarkを grep し、稼働しているサービス・バージョンを把握する。 -
2
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| erlangearmark |
All versions→ Not listed |
Not listed |
| Hexearmark |
≥ 1.4.1 (no fix yet)→ Not listed |
Not listed |
| pragdaveearmark |
≥ 8236a0570bd894b50e360da08131ec3294c20799 (no fix yet)→ Not listed |
Not listed |
This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.
Original description The description as published by the source.
Summary
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 click, 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.
Workarounds
Migrate to a maintained Markdown library such as MDEx. The earmark package has been retired on Hex and no patched release will be made.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package hex.pm
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com
- web github.com
- web repo.hex.pm