CVE-2026-48591

Stored XSS via unescaped HTML attribute values in earmark

4.8 medium EPSS 0.14%

Published 17 Jun 2026 Updated 25 Nov 2026 CNA: EEF

Check your servers for CVE-2026-48591

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-48591 affects earmark, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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 &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.

Severity (CVSS)

4.8 medium CVSS 4.0 from EEF (CNA)
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
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Attack requirements
none: an attack works without special conditions on the target
Privileges required
none: the attacker does not need an account
User interaction
passive: a user has to take part without knowing, such as by viewing a page
Impact on the vulnerable system
confidentiality low, integrity low, availability none: what an attacker can read, change or stop in the vulnerable component
Impact on other systems
confidentiality low, integrity low, availability none: what an attacker can read, change or stop beyond it

Exploitation

EPSS 0.14%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.74% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 17 Jun 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

  • CWE-83 Improper Neutralization of Script in Attributes in a Web Page

Affected products

As the CNA lists them.

ProductVersions
earmark
package earmark
affected 1.4.1 and later
Other versions: unaffected
earmark
package pragdave/earmark
affected 8236a0570bd894b50e360da08131ec3294c20799 and later
Other versions: unaffected

Is my server affected?

Find the installed version of earmark and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i earmark
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-48591 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-48591

RHEL, Rocky, Alma, Fedora

rpm -q earmark
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-48591

Alpine

apk list --installed | grep -i earmark

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-48591
trivy image --scanners vuln IMAGE | grep CVE-2026-48591

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2026-48591 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.