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.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.3%top 78.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12golang-github-yuin-goldmarkno fix listedDEBIAN-CVE-2026-5160
Debian:13golang-github-yuin-goldmarkno fix listedDEBIAN-CVE-2026-5160
Debian:14golang-github-yuin-goldmark1.8.2-1DEBIAN-CVE-2026-5160
Gogithub.com/yuin/goldmark1.7.17GO-2026-5320
Gogithub.com/yuin/goldmark/renderer/html1.7.17GHSA-c97m-vxhj-p7j6
Ubuntu:22.04:LTSgolang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160
Ubuntu:24.04:LTSgolang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160
Ubuntu:25.10golang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160
Ubuntu:26.04:LTSgolang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160
Ubuntu:26.10golang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160

Affected products (as reported)

VendorProductVersions
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

References