← Vulnerability feed

Vulnerability record · CVE-2024-55947 · published 23 December 2024

CVE-2024-55947: Gogs path traversal allows arbitrary file write and SSH access

Gogs · Gogs

Gogs, a self-hosted Git service, is vulnerable to path traversal (CWE-22) that lets a malicious user write a file to an arbitrary path on the server. Because the write is unrestricted, an attacker can place an SSH key or similar file and gain SSH access to the host. The flaw is fixed in version 0.13.1.

8.7 CVSS 4.0 High EPSS 75% · top 0.5% CWE-22 · Path traversal
8.7CVSS 4.0 base score
75%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
5References, 2 tagged exploit
17 Jun 2026Last modified by NVD

Description

Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/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:

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 4.0 score of 8.7 with high confidentiality, integrity and availability impact, public exploit information, and very high EPSS, but exploitation requires an authenticated low-privilege account and the CVE is not in KEV.

What it is

Gogs, a self-hosted Git service, is vulnerable to path traversal (CWE-22) that lets a malicious user write a file to an arbitrary path on the server. Because the write is unrestricted, an attacker can place an SSH key or similar file and gain SSH access to the host. The flaw is fixed in version 0.13.1.

Impact

An attacker with a valid low-privilege account can write files anywhere on the server and use that to obtain SSH access, effectively compromising the underlying host and any data or services it holds.

Attack surface

The vulnerability is network-reachable (AV:N) with low attack complexity and no user interaction, but requires the attacker to hold a low-privilege authenticated account (PR:L). No special conditions beyond that account are described.

Exploitation

The vendor advisory is tagged Exploit, indicating public exploit information exists, and EPSS is very high (0.752, 99.5th percentile), though the CVE is not listed in CISA KEV. No ransomware usage is documented.

What to do

  • Upgrade Gogs to 0.13.1 or later, which contains the fix.
  • If immediate upgrade is not possible, restrict or disable untrusted user accounts and review repository/file write permissions.
  • Run Gogs with a dedicated low-privilege service account and limit its filesystem write scope.
  • Harden SSH on the host: disable password auth, restrict authorized_keys locations, and monitor for unexpected key additions.
  • Audit the server filesystem for unexpected files or SSH keys written by Gogs processes.

Detection

  • Monitor Gogs application logs for file write operations to paths outside expected repository or data directories.
  • Alert on new or modified authorized_keys files and other SSH credential files on hosts running Gogs.
  • Watch for unexpected outbound SSH connections or logins originating from the Gogs host.
  • Review filesystem integrity monitoring (FIM) alerts for writes by the Gogs service account to system or home directories.

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-2024-55947 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-2024-55947), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.