---
id: "CVE-2026-31862"
kind: "vulnerability"
aliases: ["CVE-2026-31862", "GHSA-f2fc-vc88-6w7q"]
title: "@siteboon/claude-code-ui is Vulnerable to Command Injection via Multiple Parameters"
severity: "critical"
cvss: 9.1
epss: 0.00454
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "@siteboon/claude-code-ui", "fixed": ["1.24.0"], "affected": "<= 1.23.0", "ecosystem": "npm"}, {"name": "cloudcli cloud cli", "fixed": ["1.24.0"], "affected": "< 1.24.0", "ecosystem": "vendor"}]
ecosystems: ["npm", "vendor"]
tags: ["ai-tooling", "claude-code", "cwe-77", "cwe-78", "git", "node", "self-hosted"]
not_affected_if: ["no-user-accounts-exposed", "version-1.24.0-or-later"]
published_at: "2026-03-11T00:25:43+00:00"
first_seen_at: "2026-11-05T17:59:32+00:00"
updated_at: "2026-11-05T18:09:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-f2fc-vc88-6w7q", "first_seen_at": "2026-11-05T17:59:32+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31862", "first_seen_at": "2026-11-05T18:09:59+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00454, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-31862"}]
---

# @siteboon/claude-code-ui is Vulnerable to Command Injection via Multiple Parameters

The @siteboon/claude-code-ui web app passes user-supplied Git parameters (file, branch, commit message, commit hash) into shell command strings, so an authenticated user can chain shell commands. An attacker can run arbitrary OS commands as the Node.js process user, which means full server compromise.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@siteboon/claude-code-ui affected <= 1.23.0 fixed 1.24.0
- vendor:cloudcli cloud cli affected < 1.24.0 fixed 1.24.0

## How to check

- Check the installed version with `npm ls @siteboon/claude-code-ui` and confirm it is above `1.23.0`.
- Confirm whether the app's server exposes `/api/git/*` endpoints to users who can log in.
- Search `server/routes/git.js` for `execAsync(` calls that interpolate request parameters.

## Fix

- `@siteboon/claude-code-ui`: move to `1.24.0` or later.

## Timeline

- 2026-11-05T17:59:32+00:00 ghsa https://github.com/advisories/GHSA-f2fc-vc88-6w7q
- 2026-11-05T18:09:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-31862

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/siteboon/claudecodeui/security-advisories/GHSA-f2fc-vc88-6w7q
- [advisory] Maintainer's advisory: github.com https://github.com/siteboon/claudecodeui/security/advisories/GHSA-f2fc-vc88-6w7q
- [fix] Release: github.com https://github.com/siteboon/claudecodeui/releases/tag/v1.24.0

## From the sources

### Summary
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.

### Details
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

### Affected Endpoints
`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`

### Vulnerable Code

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 }
);
```

### Impact
- Remote Code Execution as the Node.js process user
- Full server compromise
- Data exfiltration
- Supply chain attacks - modify committed code to inject malware

---

### Fix

**Commit:** siteboon/claudecodeui@55567f4

#### Root cause remediation

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[]`, `message`
- `POST /api/git/checkout` — `branch`
- `POST /api/git/create-branch` — `branch`
- `GET /api/git/commits` — `commit.hash`
- `GET /api/git/commit-diff` — `commit`
- `POST /api/git/generate-commit-message` — `file`
- `POST /api/git/discard` — `file` (3 calls)
- `POST /api/git/delete-untracked` — `file`
- `POST /api/git/publish` — `branch`

A 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 / After

```js
// 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 });
```

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
