CVE-2026-31862Critical· 9.1▾ Midnight@siteboon/claude-code-ui is Vulnerable to Command Injection via Multiple Parameters
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 50.1 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Nov 5.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
Last analysed / modified upstream
0.5%
0.5% → 0.5%
Multiple Git-related API endpoints use execAsync() with string interpolation of user-controlled parameters (file, branch, message, commit), allowing authenticated attackers to execute arbitrary OS commands.
The claudecodeui application provides Git integration through various API endpoints. These endpoints accept user-controlled parameters such as file paths, branch names, commit messages, and commit hashes, which are directly interpolated into shell command strings passed to execAsync().
The application attempts to escape double quotes in some parameters, but this protection is trivially bypassable using other shell metacharacters such as:
Command substitution: $(command) or `command` Command chaining: ;, &&, || Newlines and other control characters
GET /api/git/diff - file parameter
GET /api/git/status - file parameter
POST /api/git/commit - files array and message parameter
POST /api/git/checkout - branch parameter
POST /api/git/create-branch - branch parameter
GET /api/git/commits - commit hash parameter
GET /api/git/commit-diff - commit parameter
File: server/routes/git.js
// Line 205 - git status with file parameter
const { stdout: statusOutput } = await execAsync(
`git status --porcelain "${file}"`, // INJECTION via file
{ cwd: projectPath }
);
// Lines 375-379 - git commit with files array and message
for (const file of files) {
await execAsync(`git add "${file}"`, { cwd: projectPath }); // INJECTION via files[]
}
const { stdout } = await execAsync(
`git commit -m "${message.replace(/"/g, '\\"')}"`, // INJECTION via message (bypass with $())
{ cwd: projectPath }
);
// Lines 541-543 - git show with commit parameter (no quotes!)
const { stdout } = await execAsync(
`git show ${commit}`, // INJECTION via commit
{ cwd: projectPath }
);
Commit: siteboon/claudecodeui@55567f4
All vulnerable execAsync() calls have been replaced with the existing spawnAsync() helper (which uses child_process.spawn with shell: false). Arguments are passed as an array directly to the OS — shell metacharacters in user input are inert.
Endpoints patched in server/routes/git.js:
GET /api/git/diff — file (4 calls)GET /api/git/file-with-diff — file (3 calls)POST /api/git/commit — files[], messagePOST /api/git/checkout — branchPOST /api/git/create-branch — branchGET /api/git/commits — commit.hashGET /api/git/commit-diff — commitPOST /api/git/generate-commit-message — filePOST /api/git/discard — file (3 calls)POST /api/git/delete-untracked — filePOST /api/git/publish — branchA strict allowlist regex (/^[0-9a-f]{4,64}$/i) was also added to validate the commit parameter in /api/git/commit-diff before it reaches the git process.
// BEFORE — shell interprets the string, injection possible
const { stdout } = await execAsync(`git show ${commit}`, { cwd: projectPath });
// AFTER — no shell, args passed directly to the process
const { stdout } = await spawnAsync('git', ['show', commit], { cwd: projectPath });
@siteboon/claude-code-ui <= 1.23.0Upgrade to a patched release:
@siteboon/claude-code-ui 1.24.0Connected by shared product, vendor, weakness, or advisory.
CVE-2025-59831High· 8.8git-commiters is a Node.js function module providing committers stats for their git repository
CVE-2025-11490Medium· 6.3A vulnerability has been found in wonderwhy-er DesktopCommanderMCP up to 0.2.13
CVE-2025-11491Medium· 6.3A vulnerability was found in wonderwhy-er DesktopCommanderMCP up to 0.2.13
CVE-2025-11407Medium· 6.3A weakness has been identified in D-Link DI-7001 MINI 24.04.18B1
CVE-2025-12296Medium· 4.7A security vulnerability has been detected in D-Link DAP-2695 2.00RC13
CVE-2025-9580Medium· 6.3A security vulnerability has been detected in LB-LINK BL-X26 1.2.8