Куда я попал?
SECURITM это SGRC система, ? автоматизирующая процессы в службах информационной безопасности. SECURITM помогает построить и управлять ИСПДн, КИИ, ГИС, СМИБ/СУИБ, банковскими системами защиты.
А еще SECURITM это место для обмена опытом и наработками для служб безопасности.

Gogs Git Rebase Argument Injection RCE

exploit

This module exploits an argument injection vulnerability (CVE-2026-52806) in the pull request merge flow of Gogs (< 0.14.3). The Merge() function in internal/database/pull.go passes the PR base branch name to `git rebase` without a `--` separator. A branch named `--exec=<CMD>` is parsed by Git as the --exec flag rather than a positional argument, causing `sh -c <CMD>` to run after each replayed commit during the rebase. Two exploitation methods are supported: - own_repo: The attacker creates a temporary repository, enables rebase merge, and operates entirely within their own account. Any authenticated user who can create repositories (the default) can exploit this with no interaction from other users required. - existing_repo: The attacker exploits a repository they already have write and merge access to, where "Rebase before merging" is enabled (or the attacker has repo admin permissions to enable it). This path is useful on instances where repository creation is restricted. Both methods use git to push divergent branches (including the malicious --exec= branch), open a pull request, and trigger a rebase merge to execute the payload. A local git installation is required. On Unix targets, the payload is base64-encoded inline in the malicious branch name, avoiding the need to commit files to the repository. On Windows targets, the payload is delivered via a script file committed to the repository, since NTFS forbids pipe characters in filenames. Git for Windows uses MSYS2 sh for --exec commands, enabling cross-platform exploitation. Note: a successful rebase merge may leave the server-side repository in a corrupted git state (mid-rebase). For own_repo this is inconsequential because the repository is deleted. For existing_repo this can break the target repository and prevent re-exploitation against the same repo. The Gogs API does not support token deletion, so the API access token created during exploitation cannot be removed automatically and will persist under the attacker account.

Модуль exploit/multi/http/gogs_rebase_rce
Тип exploit
Ранг Excellent
Дата раскрытия 17.03.2026
Платформа Linux,Unix,Windows
Архитектура cmd
Авторы Crypto-Cat
Файл в источнике /modules/exploits/multi/http/gogs_rebase_rce.rb

Связанные уязвимости CVE

Идентификаторы CVE, объявленные в источнике для этого модуля
Идентификатор Описание
CVE-2026-52806 Gogs: RCE via git rebase --exec argument injection in pull request merge

Связанные уязвимости БДУ ФСТЭК

Идентификатор Название
BDU:2026-09386 Уязвимость функции Merge() программного средства создания самоуправляемых Git-репозиториев Gogs, позволяющая нарушителю выполнить произвольный код

Связанные типы ошибок CWE

Идентификатор Описание
CWE-77 The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstrea...

Мы используем cookie-файлы, чтобы получить статистику, которая помогает нам улучшить сервис для вас с целью персонализации сервисов и предложений. Вы может прочитать подробнее о cookie-файлах или изменить настройки браузера. Продолжая пользоваться сайтом, вы даёте согласие на использование ваших cookie-файлов и соглашаетесь с Политикой обработки персональных данных.