提交 #1055359: FredrikNoren ungit 1.5.30 OS Command Injection信息

标题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)
提交2026-10-24 10時07分 (1 月前)
管理2026-11-23 14時33分 (1 month later)
状态已接受
VulDB条目442301 [FredrikNoren ungit 1.5.30 Remote Git API source/git-api.js credentialsOption remote 权限提升]
积分20

Do you need the next level of professionalism?

Upgrade your account now!