A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-26022

CVE-2026-26022: Gogs Self-Hosted Git Service XSS Vulnerability

CVE-2026-26022 is a stored cross-site scripting vulnerability in Gogs self-hosted Git service that allows authenticated users to inject malicious JavaScript. This article covers the technical details, affected versions, and patches.

Updated: May 14, 2026

CVE-2026-26022 Overview

CVE-2026-26022 is a stored cross-site scripting (XSS) vulnerability in Gogs, an open source self-hosted Git service. The flaw exists in the comment and issue description functionality. Gogs' HTML sanitizer explicitly allows data: URI schemes, which lets authenticated users inject arbitrary JavaScript through malicious links. When another user clicks the crafted link, the embedded script executes in their browser session. The vulnerability is tracked as [CWE-79] (Improper Neutralization of Input During Web Page Generation). Gogs version 0.14.2 fixes the issue.

Critical Impact

Authenticated attackers can execute arbitrary JavaScript in victims' browsers, enabling session theft, account compromise, and unauthorized repository actions within the Gogs instance.

Affected Products

  • Gogs versions prior to 0.14.2
  • Self-hosted Gogs Git service deployments
  • All platforms running vulnerable Gogs builds

Discovery Timeline

  • 2026-03-05 - CVE-2026-26022 published to NVD
  • 2026-03-06 - Last updated in NVD database

Technical Details for CVE-2026-26022

Vulnerability Analysis

The vulnerability resides in the markdown rendering pipeline that processes user-supplied content in issue descriptions and comments. Gogs applies an HTML sanitizer to strip dangerous markup before rendering, but the allowlist for URI schemes in anchor (<a href=...>) elements includes data:. This permissive configuration defeats the purpose of the sanitizer for link attributes.

An authenticated user with permission to file issues or post comments can craft a link whose href attribute uses a data:text/html URI containing JavaScript. When a victim user clicks the rendered link, the browser navigates to the data URI and executes the embedded script under the originating context. The attack requires user interaction but only standard authenticated privileges.

The impact includes session token theft, forced actions through the Gogs web interface, repository tampering, and pivoting to other authenticated users including administrators. Because issues and comments are persistent, every viewer who interacts with the malicious link becomes a target.

Root Cause

The root cause is an overly permissive HTML sanitization policy. The sanitizer's URI scheme allowlist included data: alongside expected schemes such as http and https. Data URIs can encode complete HTML documents with inline scripts, bypassing standard XSS filters that focus on <script> tags or javascript: URIs.

Attack Vector

An attacker authenticates to the Gogs instance and posts an issue or comment containing a markdown link pointing to a data:text/html URI. The URI encodes an HTML payload that runs JavaScript on load. When any user with access to the issue clicks the rendered link, the script executes in their browser. The fix in commit 441c64d7bd8893b2f4e48660a8be3a7472e14291 removes data: from the permitted URI schemes. See the GitHub Security Advisory GHSA-xrcr-gmf5-2r8j for additional technical context.

Detection Methods for CVE-2026-26022

Indicators of Compromise

  • Issue or comment content containing markdown links with data: URI schemes, particularly data:text/html payloads
  • Base64-encoded HTML or JavaScript fragments within anchor href attributes in stored Gogs content
  • Outbound requests from user browsers to attacker-controlled endpoints originating from Gogs pages
  • Unexpected authenticated API actions following a user viewing an issue or comment

Detection Strategies

  • Query the Gogs database for issue and comment records containing the string data: within link markup
  • Inspect web access logs for repeated views of specific issues followed by anomalous authenticated requests from the same sessions
  • Deploy a Content Security Policy (CSP) in report-only mode to surface inline script execution attempts on Gogs pages
  • Review repository audit trails for unauthorized configuration or permission changes correlated with comment activity

Monitoring Recommendations

  • Alert on creation of issues or comments containing data:text/html or data:application/javascript substrings
  • Monitor for session cookie exfiltration patterns such as outbound requests carrying Gogs session identifiers to external hosts
  • Track administrative account activity for unexpected actions following routine issue triage

How to Mitigate CVE-2026-26022

Immediate Actions Required

  • Upgrade all Gogs instances to version 0.14.2 or later without delay
  • Audit existing issues and comments for stored data: URI payloads and remove malicious content
  • Invalidate active user sessions and rotate API tokens if exploitation is suspected
  • Restrict issue and comment creation to trusted users on internet-exposed instances until patching completes

Patch Information

The fix is delivered in Gogs 0.14.2, available at the GitHub Release v0.14.2 page. The patch removes data: from the sanitizer's allowed URI schemes. Review the GitHub Commit Details and the associated GitHub Pull Request 8174 for code-level changes.

Workarounds

  • Place Gogs behind a reverse proxy that enforces a strict Content Security Policy disallowing inline scripts and data: URIs in navigations
  • Limit account creation and disable public sign-ups to reduce the pool of users who can post malicious content
  • Educate users to avoid clicking unexpected links inside Gogs issues and comments until the upgrade is complete
bash
# Configuration example: enforce CSP at reverse proxy (nginx)
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'" always;

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechGogs

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Pull Request Update

  • GitHub Release v0.14.2
  • Vendor Resources
  • GitHub Commit Details

  • GitHub Security Advisory GHSA-xrcr-gmf5-2r8j
  • Related CVEs
  • CVE-2026-26276: Gogs Self-Hosted Git Service XSS Flaw

  • CVE-2026-26195: Gogs Self-Hosted Git Service XSS Flaw

  • CVE-2026-26196: Gogs Information Disclosure Vulnerability

  • CVE-2026-25921: Gogs LFS Supply-Chain Attack Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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