Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-5160

CVE-2026-5160: Goldmark Renderer XSS Vulnerability

CVE-2026-5160 is a Cross-site Scripting flaw in github.com/yuin/goldmark/renderer/html that lets attackers bypass protocol filtering using HTML entities. This article covers technical details, affected versions, and mitigation.

Published: April 17, 2026

CVE-2026-5160 Overview

A Cross-site Scripting (XSS) vulnerability exists in the Goldmark Markdown parser's HTML renderer component (github.com/yuin/goldmark/renderer/html) prior to version 1.7.17. The vulnerability stems from improper ordering of URL validation and normalization processes, allowing attackers to bypass protocol filtering mechanisms through HTML5 named character reference encoding.

Critical Impact

Attackers can execute arbitrary JavaScript code in the context of applications that render user-supplied Markdown content, potentially leading to session hijacking, credential theft, and unauthorized actions on behalf of users.

Affected Products

  • github.com/yuin/goldmark/renderer/html versions prior to 1.7.17
  • Go applications utilizing the vulnerable Goldmark HTML renderer for Markdown processing
  • Web applications rendering untrusted Markdown content through Goldmark

Discovery Timeline

  • April 15, 2026 - CVE-2026-5160 published to NVD
  • April 15, 2026 - Last updated in NVD database

Technical Details for CVE-2026-5160

Vulnerability Analysis

The Goldmark HTML renderer implements a security check called IsDangerousURL that uses prefix-based validation to identify and block dangerous URL schemes such as javascript:. However, a critical flaw exists in the order of operations: the URL validation occurs before HTML entity resolution.

This sequencing error means that when a malicious payload like javascript:alert(1) is processed, the IsDangerousURL function examines the literal string containing the HTML entity : rather than the resolved colon character. Since the string doesn't match the expected javascript: prefix pattern, it passes validation. Subsequently, when the URL is rendered in the browser, HTML entity decoding converts : to :, resulting in an executable javascript:alert(1) URL.

This vulnerability is classified as CWE-79 (Cross-site Scripting) and affects any application that processes untrusted Markdown input through the vulnerable renderer.

Root Cause

The root cause is a time-of-check-time-of-use (TOCTOU) style vulnerability in the URL sanitization logic. The security validation layer checks URLs in their encoded form, while the browser interprets them in their decoded form. This fundamental mismatch between the validation context and the execution context creates an exploitable gap.

The IsDangerousURL function performs a simple string prefix comparison without first normalizing the input by resolving HTML entities. This oversight allows any dangerous protocol scheme to be obfuscated using HTML5 named character references (such as :, ;, <, etc.).

Attack Vector

The attack vector is network-based and requires user interaction. An attacker must craft malicious Markdown content containing encoded JavaScript URLs and convince a victim to view the rendered content. Typical attack scenarios include:

The vulnerability can be exploited by submitting malicious Markdown content through comment systems, forum posts, documentation platforms, wikis, or any web application that renders user-supplied Markdown using the vulnerable Goldmark component. When another user views the rendered content, the obfuscated JavaScript URL bypasses server-side sanitization and executes in their browser context.

Example payloads that bypass the filter include variations such as javascript:alert(document.cookie) or javascript:alert(1) where the colon character is replaced with its HTML entity equivalent.

Detection Methods for CVE-2026-5160

Indicators of Compromise

  • Presence of HTML entity-encoded URL schemes in Markdown content (e.g., :, :, :)
  • Unusual patterns combining protocol names with HTML entities in user-submitted content
  • Client-side JavaScript errors or unexpected script execution reports from users
  • Web Application Firewall (WAF) logs showing encoded JavaScript patterns in POST requests

Detection Strategies

  • Implement content scanning rules to detect HTML entity patterns adjacent to known dangerous protocol names
  • Monitor application logs for Markdown submissions containing character reference patterns like :, :, or :
  • Deploy browser-based XSS detection using Content Security Policy (CSP) violation reporting
  • Review dependency manifests to identify applications using Goldmark versions below 1.7.17

Monitoring Recommendations

  • Enable verbose logging for Markdown rendering operations to capture input patterns
  • Configure CSP headers with report-uri directive to receive real-time XSS attempt notifications
  • Implement periodic Software Composition Analysis (SCA) scans to identify vulnerable Goldmark dependencies
  • Monitor client-side error reporting services for unexpected JavaScript execution events

How to Mitigate CVE-2026-5160

Immediate Actions Required

  • Upgrade github.com/yuin/goldmark to version 1.7.17 or later immediately
  • Review and audit all applications using Goldmark for Markdown processing
  • Implement Content Security Policy (CSP) headers as a defense-in-depth measure
  • Consider temporarily disabling link rendering in Markdown if immediate patching is not possible

Patch Information

The vulnerability has been addressed in Goldmark version 1.7.17. The fix ensures that HTML entity resolution occurs before URL validation, preventing the bypass technique. The patch is available via the GitHub commit.

To update your Go application, run:

bash
go get github.com/yuin/goldmark@v1.7.17

Additional vulnerability details are available in the Snyk Vulnerability Report.

Workarounds

  • Implement server-side HTML entity decoding before passing URLs to the Goldmark renderer
  • Deploy a secondary URL validation layer that operates on decoded/normalized URLs
  • Use Content Security Policy headers to restrict inline script execution (script-src 'self')
  • Consider using an allowlist approach for URL schemes rather than a blocklist
bash
# Example: Update Go module dependency
go get github.com/yuin/goldmark@v1.7.17
go mod tidy

# Verify the installed version
go list -m github.com/yuin/goldmark

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechGoldmark

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Commit Update

  • Snyk Vulnerability Report
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English