← Vulnerability feed

Vulnerability record · CVE-2020-15867 · published 16 October 2020

CVE-2020-15867: Gogs git hook feature allows authenticated remote code execution

Gogs · Gogs

The git hook feature in Gogs 0.5.5 through 0.12.2 lets an authenticated user execute code on the server. The flaw also enables privilege escalation when hook access is granted to a non-administrative user, and the UI does not warn that the action is unsafe.

7.2 CVSS 3.1 High EPSS 87% · top 0.2%
7.2CVSS 3.1 base score, v2 6.5
87%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References, 4 tagged exploit
17 Jun 2026Last modified by NVD

Description

The git hook feature in Gogs 0.5.5 through 0.12.2 allows for authenticated remote code execution. There can be a privilege escalation if access to this hook feature is granted to a user who does not have administrative privileges. NOTE: because this is mentioned in the documentation but not in the UI, it could be considered a "Product UI does not Warn User of Unsafe Actions" issue.

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

high priorityCVSS 7.2 with high EPSS and public exploit references, but exploitation requires an authenticated account with hook privileges.

What it is

The git hook feature in Gogs 0.5.5 through 0.12.2 lets an authenticated user execute code on the server. The flaw also enables privilege escalation when hook access is granted to a non-administrative user, and the UI does not warn that the action is unsafe.

Impact

An attacker with a valid account gains remote code execution on the Gogs host, and a low-privileged user can escalate to administrative-level control of the server.

Attack surface

Reachable over the network through the git hook feature; the CVSS vector shows network access with high privileges required and no user interaction.

Exploitation

Not listed in CISA KEV, but EPSS is 0.87416 (99.7th percentile) and references are tagged Exploit, indicating public exploit material exists.

What to do

  • Upgrade Gogs past 0.12.2 to a fixed release as the first action.
  • Restrict git hook configuration to administrative accounts only.
  • Audit and remove hook access from non-administrative users.
  • Monitor or disable custom git hooks where the feature is not required.

Detection

  • Review Gogs audit logs for hook creation or modification events, especially by non-admin users.
  • Inspect repository hook directories for unexpected or recently added scripts.
  • Alert on server-side process execution spawned by the Gogs service account.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2020-15867 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

8.7CVE-2025-8110Gogs PutContents API symlink handling allows remote code executionThe PutContents API in Gogs mishandles symbolic links, letting a user write file content through a symlink and escape the intended repository path (C…KEVEPSS 85%analysed9.9CVE-2024-39930Gogs argument injection vulnerabilityThe built-in SSH server of Gogs through 0.13.0 allows argument injection in internal/ssh/ssh.go, leading to remote code execution. Authenticated atta…EPSS 7.7%9.9CVE-2024-39931Gogs internal file deletion via path handling flawGogs through 0.13.0 allows deletion of internal files. The flaw is a path handling issue (CWE-552) that lets a user with a valid account remove files…EPSS 53%analysed9.9CVE-2024-39932Gogs code injection vulnerabilityGogs through 0.13.0 allows argument injection during the previewing of changes.EPSS 17%9.8CVE-2024-56731Gogs vulnerabilityGogs is an open source self-hosted Git service. Prior to version 0.13.3, it's still possible to delete files under the .git directory and achieve rem…EPSS 1.2%9.8CVE-2022-1884Gogs os command injection vulnerabilityA remote command execution vulnerability exists in gogs/gogs versions <=0.12.7 when deployed on a Windows server. The vulnerability arises due to imp…EPSS 1.8%9.8CVE-2022-2024Gogs OS command injection before 0.12.11Gogs, a self-hosted Git service, contains an OS command injection flaw (CWE-78) in versions prior to 0.12.11. The CVSS 3.1 vector rates it 9.8 critic…EPSS 98%analysed9.8CVE-2022-1986Gogs os command injection vulnerabilityOS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.EPSS 4.5%

Source: NIST National Vulnerability Database (record CVE-2020-15867), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.