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-2024-39931

CVE-2024-39931: Gogs File Deletion Vulnerability

CVE-2024-39931 is a file deletion vulnerability in Gogs that allows unauthorized deletion of internal files in versions through 0.13.0. This post covers the technical details, affected versions, security impact, and mitigation.

Published: May 26, 2026

CVE-2024-39931 Overview

CVE-2024-39931 is a critical vulnerability in Gogs, a self-hosted Git service written in Go. The flaw, present through version 0.13.0, allows authenticated attackers to delete internal files on the server hosting the Gogs instance. The issue is classified under CWE-552 (Files or Directories Accessible to External Parties). Successful exploitation can corrupt repository state, disrupt service availability, and enable follow-on attacks against the host. The vulnerability requires only low-privileged authenticated access and can be triggered over the network without user interaction.

Critical Impact

Authenticated attackers with low privileges can delete arbitrary internal files on the Gogs server, leading to data loss, repository corruption, and potential service compromise.

Affected Products

  • Gogs versions through 0.13.0
  • Self-hosted Gogs Git service deployments
  • All platforms running vulnerable Gogs binaries (Linux, Windows, macOS)

Discovery Timeline

  • 2024-07-04 - CVE-2024-39931 published to NVD
  • 2025-04-10 - Last updated in NVD database

Technical Details for CVE-2024-39931

Vulnerability Analysis

The vulnerability resides in Gogs functionality that handles file operations within repositories. An authenticated user with low privileges can craft requests that cause the application to operate on files outside the intended repository scope. Because Gogs runs server-side file operations using the privileges of the Gogs process, deletions can affect internal files used by the application itself, not only repository content.

The issue is mapped to CWE-552, which covers files or directories that become accessible to external parties due to improper restriction of operations on resources. SonarSource researchers documented this and related issues in their analysis of unpatched Gogs vulnerabilities.

Because the attack vector is network-based and the scope is changed (the impact extends beyond the vulnerable component to the underlying host filesystem), the vulnerability carries significant risk for any organization exposing Gogs to untrusted or semi-trusted users.

Root Cause

The root cause is insufficient validation of file paths and operation targets in Gogs request handlers. The application does not adequately restrict deletion operations to authorized repository content, allowing references to internal files used by the Gogs service to be processed as valid targets.

Attack Vector

An attacker authenticates to a vulnerable Gogs instance using any low-privileged account, including accounts created through self-registration if enabled. The attacker then submits a request that triggers a file deletion routine, supplying input that resolves to an internal file path. The Gogs process performs the deletion using its own filesystem privileges. No user interaction is required.

The vulnerability manifests in the file handling logic for repository operations. See the SonarSource technical analysis for detailed exploitation mechanics.

Detection Methods for CVE-2024-39931

Indicators of Compromise

  • Unexpected absence of internal Gogs files such as configuration, session data, or authentication tokens under the Gogs working directory
  • Repository operations failing due to missing internal state files
  • Anomalous DELETE or POST requests to Gogs API endpoints involving file or repository path parameters
  • Authentication or session anomalies following file deletion events

Detection Strategies

  • Monitor Gogs application logs for repeated or unusual file operation requests from a single authenticated user
  • Enable filesystem auditing on the Gogs data directory using auditd on Linux to log deletions performed by the Gogs process
  • Inspect web access logs for requests with suspicious path parameters or directory traversal patterns targeting Gogs endpoints

Monitoring Recommendations

  • Correlate authentication events with subsequent file operation requests to identify low-privileged accounts performing destructive actions
  • Alert on changes to files in the Gogs installation directory that occur outside scheduled maintenance windows
  • Track creation of new low-privileged accounts followed by immediate API activity, which may indicate exploitation through self-registration

How to Mitigate CVE-2024-39931

Immediate Actions Required

  • Upgrade Gogs to a patched release listed in the Gogs GitHub releases page
  • Disable self-registration on Gogs instances exposed to untrusted networks to limit attacker access to authenticated endpoints
  • Restrict network access to Gogs using firewall rules or a reverse proxy with authentication enforcement
  • Audit existing user accounts and remove or disable accounts that are inactive or unverified

Patch Information

The Gogs project tracks fixes in its release notes on GitHub. Administrators should review release notes for versions after 0.13.0 and apply the latest stable build. Verify the running version with the Gogs admin panel or by checking the binary version output after upgrade.

Workarounds

  • Place Gogs behind a reverse proxy that enforces additional authentication, such as mutual TLS or single sign-on
  • Run the Gogs process under a dedicated low-privilege system account with filesystem permissions limited to required directories
  • Restrict registration to administrator-approved invitations only, eliminating anonymous account creation
  • Take regular backups of the Gogs data directory and repository storage to enable recovery from destructive actions
bash
# Configuration example: disable self-registration in app.ini
[service]
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = true
ENABLE_CAPTCHA = true

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechGogs

  • SeverityCRITICAL

  • CVSS Score9.9

  • EPSS Probability7.23%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-552
  • Technical References
  • GitHub Gogs Release Notes

  • SonarSource Blog on Gogs Vulnerabilities
  • Related CVEs
  • CVE-2026-25921: Gogs LFS Supply-Chain Attack Vulnerability

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

  • CVE-2026-26196: Gogs Information Disclosure Vulnerability

  • CVE-2026-26276: Gogs Self-Hosted Git Service XSS Flaw
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