Vulnerability · Published Apr 15, 2026 · Assigned by snyk
CVE-2026-5160
Medium 6.1
In plain English
A medium-severity cross-site scripting in github.com/yuin/goldmark/renderer/html. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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:alert(1) is not recognized as dangerous during validation, leading to arbitrary script execution in the context of applications that render the URL.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | golang-github-yuin-goldmark | no fix listed | DEBIAN-CVE-2026-5160 |
| Debian:13 | golang-github-yuin-goldmark | no fix listed | DEBIAN-CVE-2026-5160 |
| Debian:14 | golang-github-yuin-goldmark | 1.8.2-1 | DEBIAN-CVE-2026-5160 |
| Go | github.com/yuin/goldmark | 1.7.17 | GO-2026-5320 |
| Go | github.com/yuin/goldmark/renderer/html | 1.7.17 | GHSA-c97m-vxhj-p7j6 |
| Ubuntu:22.04:LTS | golang-github-yuin-goldmark | no fix listed | UBUNTU-CVE-2026-5160 |
| Ubuntu:24.04:LTS | golang-github-yuin-goldmark | no fix listed | UBUNTU-CVE-2026-5160 |
| Ubuntu:25.10 | golang-github-yuin-goldmark | no fix listed | UBUNTU-CVE-2026-5160 |
| Ubuntu:26.04:LTS | golang-github-yuin-goldmark | no fix listed | UBUNTU-CVE-2026-5160 |
| Ubuntu:26.10 | golang-github-yuin-goldmark | no fix listed | UBUNTU-CVE-2026-5160 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | github.com/yuin/goldmark/renderer/html | 0 – before 1.7.17 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N