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
    • 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-2020-15867

CVE-2020-15867: Gogs Git Hook RCE Vulnerability

CVE-2020-15867 is a remote code execution vulnerability in Gogs affecting versions 0.5.5 through 0.12.2. The git hook feature enables authenticated attackers to execute arbitrary code. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 4, 2026

CVE-2020-15867 Overview

CVE-2020-15867 is a remote code execution vulnerability affecting Gogs, a self-hosted Git service. The git hook feature in Gogs versions 0.5.5 through 0.12.2 allows authenticated users to execute arbitrary code on the server. This vulnerability presents a significant privilege escalation risk when access to the hook feature is granted to users who do not have administrative privileges. Notably, while this functionality is documented, it is not clearly warned about in the user interface, which the CVE notes could be considered a "Product UI does not Warn User of Unsafe Actions" issue.

Critical Impact

Authenticated attackers can achieve remote code execution on Gogs servers, potentially leading to complete system compromise, data theft, and lateral movement within the network.

Affected Products

  • Gogs versions 0.5.5 through 0.12.2
  • Self-hosted Gogs Git service installations
  • Environments where non-administrative users have access to git hook features

Discovery Timeline

  • 2020-10-16 - CVE CVE-2020-15867 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-15867

Vulnerability Analysis

This vulnerability exists in the git hook feature of Gogs, which allows users to configure server-side scripts that execute during git operations such as pre-receive, post-receive, and update hooks. The core issue is that this powerful functionality can be assigned to non-administrative users without adequate warning or access controls.

Git hooks are shell scripts that run on the server during various git events. When a user with access to this feature configures a malicious hook, they can execute arbitrary commands with the privileges of the Gogs server process. This effectively transforms a standard user account into an attack vector for complete server compromise.

The vulnerability is particularly dangerous because the user interface does not adequately warn administrators about the security implications of granting hook access to non-admin users. While the documentation mentions this capability, the lack of UI warnings creates an operational security gap.

Root Cause

The root cause of this vulnerability is insufficient access control and warning mechanisms around the git hook feature. Gogs allows administrators to grant hook access to regular users, but fails to:

  1. Adequately restrict which commands can be executed within hooks
  2. Warn administrators in the UI about the security implications of granting hook access
  3. Implement sandboxing or command filtering for hook execution

This design flaw means that any authenticated user with hook access can leverage this feature to execute arbitrary system commands.

Attack Vector

The attack vector for CVE-2020-15867 involves an authenticated user with access to the git hook feature. The attacker can exploit this vulnerability through the following steps:

  1. Authenticate to the Gogs instance with a user account that has git hook permissions
  2. Navigate to a repository where they have hook configuration access
  3. Create or modify a git hook (such as post-receive) to include malicious shell commands
  4. Trigger the hook execution by performing the corresponding git operation (e.g., pushing code to the repository)
  5. The malicious commands execute with the privileges of the Gogs server process

The vulnerability requires authentication but does not require administrative privileges if hook access has been inappropriately delegated. For detailed technical analysis, see the FZI Security Vulnerability Analysis and the Packet Storm RCE Exploit documentation.

Detection Methods for CVE-2020-15867

Indicators of Compromise

  • Unexpected modifications to git hook files in repository directories (typically located in hooks/ subdirectories)
  • Unusual process spawning from the Gogs server process
  • Suspicious network connections originating from the Gogs server
  • Unauthorized file system access or modifications in server directories
  • Anomalous git operations followed by unexpected system activity

Detection Strategies

  • Monitor git hook file modifications across all repositories for unauthorized changes
  • Implement file integrity monitoring on the Gogs installation directory and repository hooks
  • Review Gogs access logs for users accessing hook configuration endpoints
  • Deploy endpoint detection to identify suspicious process chains originating from the Gogs process
  • Audit user permissions to identify non-admin accounts with hook access

Monitoring Recommendations

  • Enable verbose logging in Gogs to capture hook-related activities
  • Set up alerts for any modifications to git hook scripts in production repositories
  • Monitor for unusual command execution patterns from the Gogs service account
  • Implement network monitoring to detect unexpected outbound connections from the Gogs server
  • Regularly review user permission assignments, especially hook access delegation

How to Mitigate CVE-2020-15867

Immediate Actions Required

  • Audit all Gogs user accounts and revoke git hook access from non-administrative users
  • Review existing git hooks across all repositories for malicious or unauthorized content
  • Update Gogs to the latest available version beyond 0.12.2
  • Implement network segmentation to limit the impact of potential server compromise
  • Consider temporarily disabling the git hook feature if not operationally required

Patch Information

Administrators should upgrade Gogs to a version newer than 0.12.2 that addresses this vulnerability. Check the official Gogs releases for security patches. Given the severity of this vulnerability, immediate patching is recommended. Organizations should also consider migrating to alternative solutions if timely patches are not available.

Workarounds

  • Restrict git hook permissions to only trusted administrative users
  • Implement additional access controls at the operating system level to limit what commands hooks can execute
  • Run Gogs with minimal system privileges using a dedicated service account
  • Use containerization or sandboxing to isolate the Gogs instance from critical infrastructure
  • Deploy application-level firewalls to restrict outbound connections from the Gogs server
bash
# Configuration example - Restrict hook access at the OS level
# Create a dedicated low-privilege user for Gogs
useradd -r -s /sbin/nologin gogs-service

# Set restrictive permissions on the hooks directory
chmod 750 /path/to/gogs/repositories/*/hooks
chown root:gogs-service /path/to/gogs/repositories/*/hooks

# Consider using SELinux or AppArmor to further restrict Gogs process capabilities

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGogs

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability92.35%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-noinfo
  • Technical References
  • Packet Storm RCE Exploit

  • FZI Security Vulnerability Analysis
  • Related CVEs
  • CVE-2026-26194: Gogs Git Service RCE Vulnerability

  • CVE-2025-64111: Gogs Git Service RCE Vulnerability

  • CVE-2025-8110: Gogs RCE Vulnerability via Symlink Handling

  • CVE-2024-56731: Gogs Remote Code Execution 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