CVE-2026-5160

NameCVE-2026-5160
DescriptionVersions 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
golang-github-yuin-goldmark (PTS)bullseye1.3.2-1vulnerable
bookworm1.5.4-1vulnerable
trixie1.7.4-1vulnerable
forky, sid1.8.2-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
golang-github-yuin-goldmarksource(unstable)1.8.2-1

Notes

[trixie] - golang-github-yuin-goldmark <no-dsa> (Minor issue)
[bookworm] - golang-github-yuin-goldmark <no-dsa> (Minor issue)
[bullseye] - golang-github-yuin-goldmark <ignored> (Out of security support for bullseye)
Fixed by: https://github.com/yuin/goldmark/commit/cb46bbc4eca29d55aa9721e04ad207c23ccc44f9 (v1.7.17)

Search for package or bug name: Reporting problems