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

- Severity: Medium 5.1 (CVSS:4.0, scored by snyk) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 22% of CVEs (2026-11-30)
- Published: 2026-04-15T05:00:01.655Z
- Modified: 2026-09-10T03:50:43.784Z
- Also known as: GHSA-c97m-vxhj-p7j6, GO-2026-5320
- Related: CGA-472v-6vrr-8c84
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- github.com/yuin/goldmark/renderer/html: before 1.7.17
- github.com/yuin/goldmark/renderer/html (Go): before 1.7.17
- github.com/yuin/goldmark (Go): before 1.7.17
- yuin goldmark: before 1.7.17

## Every score

- snyk: 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`
- snyk: 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`
- GitHub: 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`
- GitHub: CVSS:4.0 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`

## References

- <https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMYUINGOLDMARKRENDERERHTML-15838406> (mitigation, third-party-advisory, web)
- <https://github.com/yuin/goldmark/commit/cb46bbc4eca29d55aa9721e04ad207c23ccc44f9> (fix, patch, 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)

## Sources

- CVE List: [CVE-2026-5160](https://www.cve.org/CVERecord?id=CVE-2026-5160), CVE Terms of Use, modified 2026-04-15
- GitHub Advisory Database: [GHSA-c97m-vxhj-p7j6](https://github.com/advisories/GHSA-c97m-vxhj-p7j6), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2026-5320](https://pkg.go.dev/vuln/GO-2026-5320), CC-BY-4.0, modified 2026-07-22
- NVD: [CVE-2026-5160](https://nvd.nist.gov/vuln/detail/CVE-2026-5160), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-5160 · Whole record: https://cve.day/CVE-2026-5160.json · Rebuilt by cve.day 2026-11-25T22:59:18.818Z
