Loading...
Skip to main content

CVE-2026-31862 — Vulnerability in @siteboon/claudecodeui — CVE Details

CRITICAL

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

Published March 11, 2026Updated March 13, 2026Source: osv

Summary

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

Advisory Timeline

  • First published March 11, 2026 (216 days ago).
  • Last revised March 13, 2026 — 2 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @siteboon/claudecodeui to 1.24.0 or later
npm install @siteboon/claudecodeui@1.24.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@siteboon/claudecodeui
npm
All versions1.24.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-31862?
@siteboon/claude-code-ui is Vulnerable to Command Injection via Multiple Parameters This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2026-31862?
CVE-2026-31862 affects @siteboon/claudecodeui. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-31862 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-f2fc-vc88-6w7q

Related CVEs

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

  • CVE-2026-31861
    HIGH

    @siteboon/claude-code-ui is Vulnerable to Shell Command Injection in Git Routes

  • CVE-2026-31975
    HIGH

    @siteboon/claude-code-ui Vulnerable to Unauthenticated RCE via WebSocket Shell Injection

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies