NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2026-5160: goldmark vulnerable to Cross-site Scripting (XSS)

mediumCVSS 4.0 5.1 · 3.1 6.1GHSA-c97m-vxhj-p7j6

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.

Published Apr 17, 2026 · Updated Apr 18, 2026

Affected packages

github.com/yuin/goldmark/renderer/html

Ecosystem
Go
Affected
< 1.7.17
Fixed in
1.7.17
Check
go list -m github.com/yuin/goldmark/renderer/html

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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&colon;alert(1) is not recognized as dangerous during validation, leading to arbitrary script execution in the context of applications that render the URL.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology