cve.bz

CVE-2026-5160 yuin goldmark: Cross-site Scripting

5.1 mediumEPSS 0.3%Fix available

Medium (5.1) in yuin goldmark. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/yuin/goldmark/renderer/html 1.7.17.

On this page
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.

Severity

CVSS 4.0

5.1 medium
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

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 22nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-04-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-5160 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-5160?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-5160?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-5160 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
yuin:goldmarkbefore 1.7.17

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-c97m-vxhj-p7j6Gogithub.com/yuin/goldmark/renderer/html<1.7.171.7.17
GO-2026-5320Gogithub.com/yuin/goldmark<1.7.171.7.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13golang-github-yuin-goldmarkno fix listedDEBIAN-CVE-2026-5160
Debian14golang-github-yuin-goldmark1.8.2-1DEBIAN-CVE-2026-5160
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 moregolang-github-yuin-goldmarkno fix listedUBUNTU-CVE-2026-5160
SUSELinux Micro 6.2mcphost0.34.0-160000.3.1SUSE-SU-2026:22994-1
openSUSELeap 16.0govulncheck-vulndb0.0.20260723T184607-160000.1.1openSUSE-SU-2026:21483-1
openSUSELeap 16.0mcphost0.34.0-160000.3.1openSUSE-SU-2026:21480-1
openSUSETumbleweedmcphost0.34.0-9.1openSUSE-SU-2026:11366-1
Azure Linux3gh2.62.0-15AZL-83048
Azure Linux3telegraf1.31.0-19AZL-83060
Alpaquita25osv-scanner2.1.0-r13BELL-CVE-2026-5160
Alpaquitastreamosv-scanner2.4.0-r3BELL-CVE-2026-5160

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

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. This allows an attacker to bypass protocol filtering by encoding dangerous schemes, leading to arbitrary script execution when a malicious URL is rendered.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Custom Metric Autoscaler operator for Red Hat Openshiftcustom-metrics-autoscaler/custom-metrics-autoscaler-adapter-rhel9Fix deferred
Custom Metric Autoscaler operator for Red Hat Openshiftcustom-metrics-autoscaler/custom-metrics-autoscaler-admission-webhooks-rhel9Fix deferred
Custom Metric Autoscaler operator for Red Hat Openshiftcustom-metrics-autoscaler/custom-metrics-autoscaler-rhel9Fix deferred
Custom Metric Autoscaler operator for Red Hat Openshiftcustom-metrics-autoscaler/custom-metrics-autoscaler-rhel9-operatorFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-5160.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON