The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-25120

CVE-2026-25120: Gogs Authorization Bypass Vulnerability

CVE-2026-25120 is an authorization bypass flaw in Gogs that allows repository administrators to delete comments from any repository by bypassing authorization controls. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: February 20, 2026

CVE-2026-25120 Overview

CVE-2026-25120 is an Authorization Bypass vulnerability in Gogs, an open source self-hosted Git service. In versions 0.13.4 and below, the DeleteComment API does not verify that the comment belongs to the repository specified in the URL. This allows a repository administrator to delete comments from any other repository by supplying arbitrary comment IDs, bypassing authorization controls.

Critical Impact

Repository administrators can delete comments from any repository on the Gogs instance, potentially disrupting collaboration, removing important code review feedback, or covering malicious activity trails.

Affected Products

  • Gogs versions 0.13.4 and below
  • Self-hosted Git service deployments using vulnerable Gogs versions

Discovery Timeline

  • 2026-02-19 - CVE-2026-25120 published to NVD
  • 2026-02-19 - Last updated in NVD database

Technical Details for CVE-2026-25120

Vulnerability Analysis

This vulnerability represents a classic Insecure Direct Object Reference (IDOR) flaw within the Gogs API. The DeleteComment function retrieves a comment by its ID without verifying that the comment belongs to the repository specified in the API request URL. The underlying Database function DeleteCommentByID performs no repository validation, creating a broken access control condition.

The exploitation path requires the attacker to have administrator privileges on at least one repository within the Gogs instance. From that position, they can craft API requests targeting comments in other repositories by simply changing the comment ID parameter, effectively bypassing the intended repository-level authorization controls.

Root Cause

The root cause is insufficient authorization validation in the comment deletion workflow. Specifically, the application fails to verify that the comment's parent issue belongs to the same repository context from which the deletion request originated. This is classified under CWE-639 (Authorization Bypass Through User-Controlled Key), where user-supplied input (the comment ID) directly controls which resource is accessed without proper ownership verification.

Attack Vector

An attacker with repository administrator privileges can exploit this vulnerability through network-accessible API endpoints. The attack involves:

  1. Authenticating to a Gogs instance as a repository administrator
  2. Identifying target comment IDs from other repositories (through enumeration or prior knowledge)
  3. Sending DeleteComment API requests with arbitrary comment IDs
  4. Successfully deleting comments from repositories outside the attacker's administrative scope
go
// Security patch adding repository ownership verification
// Source: https://github.com/gogs/gogs/commit/1b226ca48dc8b3e95cc1c41229d72819c960a1b7

 		return
 	}
 
+	issue, err := database.GetIssueByID(comment.IssueID)
+	if err != nil {
+		c.NotFoundOrError(err, "get issue by ID")
+		return
+	}
+
+	if issue.RepoID != c.Repo.Repository.ID {
+		c.NotFound()
+		return
+	}
+
 	if c.User.ID != comment.PosterID && !c.Repo.IsAdmin() {
 		c.Status(http.StatusForbidden)
 		return

The patch adds critical ownership verification by fetching the issue associated with the comment and validating that the issue's repository ID matches the repository context of the current request.

Detection Methods for CVE-2026-25120

Indicators of Compromise

  • Unusual API activity patterns showing DeleteComment requests with comment IDs not belonging to the specified repository
  • Audit logs revealing repository administrators accessing or modifying resources outside their authorized repositories
  • Unexpected deletion of issue comments, particularly in repositories where the deleting user has no administrative access

Detection Strategies

  • Implement API request logging that captures the full context of DeleteComment operations, including the requesting user, target repository, and comment ID
  • Create correlation rules that flag when a user's delete operations span multiple repositories they don't own
  • Monitor for sequential or enumeration-style comment ID access patterns that may indicate exploitation attempts

Monitoring Recommendations

  • Enable verbose audit logging for all API operations in Gogs
  • Set up alerts for anomalous cross-repository administrative actions
  • Review Gogs access logs for patterns of comment deletion activity across repository boundaries

How to Mitigate CVE-2026-25120

Immediate Actions Required

  • Upgrade Gogs to version 0.14.0 or later which contains the security fix
  • Audit existing repository administrator accounts and restrict privileges where possible
  • Review audit logs for any suspicious cross-repository comment deletion activity

Patch Information

The vulnerability has been fixed in Gogs version 0.14.0. The patch implements proper repository ownership verification by checking that the comment's parent issue belongs to the repository specified in the API request. For detailed information, refer to the GitHub Security Advisory and the security patch commit.

Workarounds

  • Restrict repository administrator privileges to only essential trusted users until the patch can be applied
  • Implement network-level access controls to limit API endpoint exposure
  • Consider placing Gogs behind an API gateway that can provide additional request validation and logging
bash
# Configuration example - Update Gogs to patched version
# Check current Gogs version
./gogs --version

# Backup your data before upgrading
tar -czvf gogs-backup.tar.gz /path/to/gogs-data

# Download and install Gogs 0.14.0 or later
wget https://github.com/gogs/gogs/releases/download/v0.14.0/gogs_0.14.0_linux_amd64.tar.gz
tar -xzvf gogs_0.14.0_linux_amd64.tar.gz

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGogs

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/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
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-639
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25229: Gogs Auth Bypass Vulnerability

  • CVE-2025-64175: Gogs Auth Bypass Vulnerability

  • CVE-2026-23632: Gogs Auth Bypass Vulnerability

  • CVE-2026-26196: Gogs Information Disclosure Vulnerability
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