PT-2023-9825 · Gogs+1 · Gogs+1
Manassehzhou
·
Publicado
2023-10-27
·
Atualizado
2026-01-15
·
CVE-2024-55947
CVSS v3.1
8.8
Alta
| Vetor | 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
Correção
Path traversal
RCE
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Gogs
Suse