| Название | FredrikNoren ungit 1.5.30 OS Command Injection |
|---|
| Описание | ungit 1.5.30 starts an Express server on 127.0.0.1:8448 with authentication disabled by default. The GET endpoints /api/remote/tags and /api/fetch accept attacker-controlled remote and socketId parameters.
In source/git-api.js, the credentialsOption function interpolates the remote parameter directly into the Git credential.helper configuration value without escaping or validation. Git executes credential.helper through a shell. When remote contains a shell metacharacter such as a semicolon, the trailing data is interpreted as an additional shell command.
The socketId value "ignore" bypasses the socket validation check. An attacker can therefore submit a request containing a value similar to http://attacker.example/repository;<command>. When the remote server returns HTTP 401 with a WWW-Authenticate challenge, Git invokes the credential helper and executes the injected command with the privileges of the ungit process.
Both affected endpoints are simple GET requests and do not require a CORS preflight. A malicious webpage can deliver the request to a reachable local ungit instance without reading the response. The response body is not required for exploitation. On Linux and macOS the command executes without additional interaction. On Windows, Git Credential Manager may display a credential dialog before the injected helper is reached; cancelling the dialog allows execution to continue.
Successful exploitation provides arbitrary shell command execution under the privileges of the user running ungit. The public report contains reproduction steps and a callback-based proof of command execution.
The issue is publicly documented at:
https://github.com/FredrikNoren/ungit/issues/1688
Remediation should require authentication by default, remove the socketId bypass, validate remote values against an allow-list, and avoid interpolating request parameters into shell-evaluated Git configuration strings. |
|---|
| Источник | ⚠️ https://github.com/FredrikNoren/ungit/issues/1688 |
|---|
| Пользователь | fifker (UID 101353) |
|---|
| Представление | 24.10.2026 10:07 (1 месяц назад) |
|---|
| Модерация | 23.11.2026 14:33 (1 month later) |
|---|
| Статус | принято |
|---|
| Запись VulDB | 442301 [FredrikNoren ungit 1.5.30 Remote Git API source/git-api.js credentialsOption remote эскалация привилегий] |
|---|
| Баллы | 20 |
|---|