Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.1%top 97%

CVE-2026-48591: CWE-83 Improper Neutralization of Script in Attributes in a Web Page in pragdave earmark

0
Medium
VulnerabilityCVE-2026-48591cvecve-2026-48591cwe-83
Published: 06/17/2026 (06/17/2026, 16:42:37 UTC)
Source: CVE Database V5
Vendor/Project: pragdave
Product: 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. '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. 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.

CVSS v4.0

Score 4.8medium

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
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

Affected software

earmark
pkg:hex/earmark
Affected versions
=1.4.1
GitHub Actionsmore threats →cve
pragdave/earmark
pkg:github/pragdave/earmark
CPE configurations
cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/24/2026, 19:52:41 UTC

Technical Analysis

This vulnerability in pragdave earmark occurs because attribute values in generated HTML are inserted verbatim between double quotes without proper escaping. While text nodes are escaped, attribute values are not, allowing a crafted markdown link containing a double quote to prematurely close the attribute and inject additional HTML attributes with malicious JavaScript. For example, a markdown link with a URL containing a double quote and an onerror event handler results in arbitrary script execution in the victim's browser. The earmark library has been retired on Hex and will not receive a patch. Versions from 1.4.1 onward are affected.

Potential Impact

An attacker can exploit this vulnerability to execute arbitrary JavaScript in the context of the victim's browser via stored XSS. This can lead to session hijacking, defacement, or other malicious actions depending on the victim's environment and privileges. The CVSS 4.8 (medium severity) reflects the local attack vector and user interaction required, with low confidentiality and integrity impact but limited availability impact.

Mitigation Recommendations

No official patch or fix is available since the earmark library is no longer maintained. Users should migrate away from earmark (versions 1.4.1 and later) to a maintained Markdown library such as MDEx to avoid this vulnerability.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-05-22T09:36:56.834Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a32dadcf198dc38c1cefc7a

Added to database: 06/17/2026, 17:35:24 UTC

Last enriched: 06/24/2026, 19:52:41 UTC

Last updated: 08/01/2026, 19:18:00 UTC

Views: 90

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses