CVE-2026-5160
MEDIUM 5.1CVSS 4.0goldmark vulnerable to Cross-site Scripting (XSS)
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.
- Published
- 15 Apr 2026
- Last modified
- 10 Sep 2026
- Assigned by
- report@snyk.io
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-c97m-vxhj-p7j6GO-2026-5320
- Sources
- NVDJSONOSV GHSA-c97m-vxhj-p7j6JSONOSV GO-2026-5320JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | report@snyk.io (Secondary) | CVSS 4.0 | MEDIUM 5.1 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | yuin | goldmarkcpe:2.3:a:yuin:goldmark:*:*:*:*:*:*:*:* |
< 1.7.17 | 1.7.17 |
| OSV | Go | github.com/yuin/goldmark/renderer/html | < 1.7.17 | 1.7.17 |
| OSV | Go | github.com/yuin/goldmark | < 1.7.17 | 1.7.17 |
References
- https://github.com/yuin/goldmark/commit/cb46bbc4eca29d55aa9721e04ad207c23ccc44f9 · Patch, WEB, FIX
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMYUINGOLDMARKRENDERERHTML-15838406 · Mitigation, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-5160 · ADVISORY
- https://github.com/yuin/goldmark · PACKAGE
- https://github.com/advisories/GHSA-c97m-vxhj-p7j6 · ADVISORY
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 15 Apr 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Apr 2026)