{"cve":"CVE-2026-5160","nvd":{"published":"2026-04-15T06:16:13.860","modified":"2026-06-17T10:58:31.247","status":"Analyzed","description":"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.","cvss_v4":{"vector":"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","score":5.1},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/yuin/goldmark/commit/cb46bbc4eca29d55aa9721e04ad207c23ccc44f9","https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMYUINGOLDMARKRENDERERHTML-15838406"],"products":["yuin:goldmark"],"source":"nvd","synced_at":"2026-10-19T22:30:49.762551342+00:00"},"epss":{"cve":"CVE-2026-5160","score":0.00287,"percentile":0.21228,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-c97m-vxhj-p7j6","url":"https://osv.dev/vulnerability/GHSA-c97m-vxhj-p7j6","summary":"goldmark vulnerable to Cross-site Scripting (XSS)","modified":"2026-09-10T03:50:43.784301907Z","packages":[{"ecosystem":"Go","name":"github.com/yuin/goldmark/renderer/html","purl":"pkg:golang/github.com/yuin/goldmark/renderer/html","ranges":["<1.7.17"],"fixed":["1.7.17"]}]},{"id":"GO-2026-5320","url":"https://osv.dev/vulnerability/GO-2026-5320","summary":"Cross-site Scripting (XSS) in github.com/yuin/goldmark","modified":"2026-07-22T20:59:36.886153285Z","packages":[{"ecosystem":"Go","name":"github.com/yuin/goldmark","purl":"pkg:golang/github.com/yuin/goldmark","ranges":["<1.7.17"],"fixed":["1.7.17"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}