PT-2023-9825 · Gogs+1 · Gogs+1
Manassehzhou
·
Published
2023-10-27
·
Updated
2026-01-15
·
CVE-2024-55947
CVSS v3.1
8.8
High
| Vector | AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Gogs versions prior to 0.13.1
Description
Gogs, an open-source self-hosted Git service, has a flaw that allows a malicious user to write files to arbitrary locations on the server, potentially gaining SSH access. The issue stems from improper path validation in the file update API. Exploitation involves using a crafted request to write a file, such as an SSH authorized key, to a sensitive directory. The API endpoint used for this is
/api/v1/repos/{repo}/contents/{path}. The vulnerable parameter is the path within this endpoint, allowing for path traversal using sequences like ../../../../. The PUT method is used to write the file.Recommendations
Upgrade to Gogs version 0.13.1 or later to resolve this issue.
Exploit
Fix
Path traversal
RCE
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Gogs
Suse