NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

goldmark vulnerable to Cross-site Scripting (XSS)GHSA-c97m-vxhj-p7j6

MEDIUMFix: yuin/goldmark@cb46bbc

GHSA-c97m-vxhj-p7j6 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in github.com/yuin/goldmark/renderer/html. A fix is available for github.com/yuin/goldmark/renderer/html — see the affected versions and patch details below.

Also known asCVE-2026-5160GO-2026-5320
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs21th percentile — riskier than 21% of all scored CVEsHighest risk
0.00%0.28%0.56%0.84%0.0%0.3%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🐹github.com/yuin/goldmark/renderer/html

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/yuin/goldmark/renderer/htmlall versions1.7.17go get github.com/yuin/goldmark/renderer/html@v1.7.17

Affected Products

1 product · 1 configurations
Application
goldmarkyuin
< 1.7.17
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/yuin/goldmark/renderer/html, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/yuin/goldmark/renderer/html to 1.7.17 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c97m-vxhj-p7j6 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This vulnerability is rated as Moderate as user interaction is required by accessing the maliciously crafted content in order to an attacker perform the exploit. A Cross-site Scripting (XSS) flaw exists in `github.com/yuin/goldmark/renderer/html` due to incorrect ordering of URL validation and HTML entity resolution.…

Workaround published by Red Hat
To mitigate this vulnerability, avoid rendering untrusted content with applications utilizing `github.com/yuin/goldmark/renderer/html`. Ensure that all input processed by the affected component is thoroughly sanitized to prevent the injection of malicious HTML entities or dangerous URL schemes.
Source: Red Hat security advisory for GHSA-c97m-vxhj-p7j6 (CC BY 4.0)

Frequently Asked Questions

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
O3 Security · Impact-Aware SCA

Is GHSA-c97m-vxhj-p7j6 in your dependencies?

Find it across Go, including transitive dependencies.

goldmark vulnerable to Cross-site Scripting (XSS)