PT-2026-6745 · Gogs · Gogs
CVE-2025-64111
·
Published
2026-02-06
·
Updated
2026-08-01
CVSS v3.1
9.8
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Gogs versions prior to 0.13.4
Description
An OS command injection exists due to an insufficient patch for a previous issue. An attacker can abuse a symlink and the repository contents API to update files within the
.git directory, specifically overwriting the .git/config file. By injecting malicious Git configurations, such as the sshCommand variable, remote command execution is achieved during Git operations. The issue occurs because the security check in the UpdateRepoFile() function is bypassed when called via the API router. The affected API endpoint is /api/v1/repos/{owner}/{repo}/contents/{file path}.Recommendations
Update Gogs to version 0.13.4 or 0.14.0+dev.
Exploit
Fix
RCE
OS Command Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Gogs