cve.bz

CVE-2026-5160

5.1 mediumEPSS 0.3%

Medium (5.1) in yuin goldmark. EPSS 0.3% chance of exploitation in the next 30 days. Fixed in github.com/yuin/goldmark/renderer/html 1.7.17.

Versions of the package github.com/yuin/goldmark/renderer/html before 1.7.17 are vulnerable to Cross-site Scripting (XSS) due to improper ordering of URL validation and normalization. The renderer validates link destinations using a prefix-based check (IsDangerousURL) before resolving HTML entities. This allows an attacker to bypass protocol filtering by encoding dangerous schemes using HTML5 named character references. For example, a payload such as javascript:alert(1) is not recognized as dangerous during validation, leading to arbitrary script execution in the context of applications that render the URL.

Severity

CVSS 4.0

5.1 medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% chance of exploitation in the next 30 days; higher than 21% of CVEs (scores of 2026-10-31)
CWE
CWE-79
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-c97m-vxhj-p7j6Gogithub.com/yuin/goldmark/renderer/html<1.7.171.7.17
GO-2026-5320Gogithub.com/yuin/goldmark<1.7.171.7.17

References

Check your stackJSON