EEF-CVE-2026-48591

Source
https://cna.erlef.org/osv/EEF-CVE-2026-48591.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-48591.json
JSON Data
https://api.test.osv.dev/v1/vulns/EEF-CVE-2026-48591
Aliases
Published
2026-06-17T16:42:37.508Z
Modified
2026-06-18T15:11:25.695557486Z
Severity
  • 4.8 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Stored XSS via unescaped HTML attribute values in earmark
Details

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.

'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 ", 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.

Workaround

Migrate to a maintained Markdown library such as MDEx (https://hex.pm/packages/mdex). The earmark package has been retired on Hex and no patched release will be made.

Database specific
{
    "cpe_ids": [
        "cpe:2.3:a:pragdave:earmark:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids": [
        "CWE-83"
    ],
    "capec_ids": [
        "CAPEC-243"
    ]
}
References
Credits
    • Peter Ullrich - FINDER
    • Robert Dober - REMEDIATION_DEVELOPER
    • Jonatan Männchen / EEF - ANALYST

Affected packages

Hex / earmark

Package

Name
earmark
Purl
pkg:hex/earmark

Affected ranges

Type
SEMVER
Events
Introduced
1.4.1

Affected versions

1.*
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.4.6
1.4.7
1.4.8
1.4.9
1.4.10
1.4.12
1.4.13
1.4.14
1.4.15
1.4.16-pre
1.4.16-pre1
1.4.16-pre2
1.4.16
1.4.17
1.4.18
1.4.19
1.4.20
1.4.21
1.4.22
1.4.23
1.4.24
1.4.25
1.4.26
1.4.27
1.4.28
1.4.29
1.4.30
1.4.31
1.4.32
1.4.33
1.4.34
1.4.35
1.4.36
1.4.37
1.4.38
1.4.39
1.4.40
1.4.41
1.4.42
1.4.43
1.4.44
1.4.45
1.4.46
1.4.47
1.4.48
1.4.49
1.5.0-pre
1.5.0-pre1

Database specific

source
"https://cna.erlef.org/osv/EEF-CVE-2026-48591.json"

Git / github.com/pragdave/earmark

Affected ranges

Type
GIT
Repo
https://github.com/pragdave/earmark
Events

Affected versions

1.*
1.4.3
1.4.4
v1.*
v1.4.1
v1.4.10
v1.4.12
v1.4.13
v1.4.14
v1.4.15
v1.4.16-pre
v1.4.16-pre2
v1.4.17
v1.4.18
v1.4.19
v1.4.2
v1.4.20
v1.4.21
v1.4.22
v1.4.23
v1.4.24
v1.4.25
v1.4.25-pre
v1.4.29
v1.4.30
v1.4.31
v1.4.32
v1.4.33
v1.4.34
v1.4.35
v1.4.36
v1.4.37
v1.4.38
v1.4.40
v1.4.41
v1.4.42
v1.4.43
v1.4.44
v1.4.45
v1.4.46
v1.4.48
v1.4.5
v1.4.6
v1.4.7
v1.4.8
v1.4.9
v1.5.0-pre
v1.5.0-pre1

Database specific

source
"https://cna.erlef.org/osv/EEF-CVE-2026-48591.json"