CVE-2026-47092 Overview
CVE-2026-47092 is a command injection vulnerability in Claude HUD versions through 0.0.12 on Windows systems. The flaw allows local attackers to execute arbitrary commands by manipulating the COMSPEC environment variable before claude-hud performs its version check. When the application calls execFile() with cmd.exe arguments, it trusts the attacker-controlled COMSPEC value, causing the attacker-supplied executable to run with the user's privileges. The issue is tracked under CWE-427: Uncontrolled Search Path Element and was patched in commit 234d9aa.
Critical Impact
Local attackers on Windows can achieve arbitrary code execution by setting COMSPEC to a malicious binary before claude-hud invokes its Windows version lookup routine.
Affected Products
- Claude HUD through version 0.0.12
- Windows installations of claude-hud relying on the COMSPEC environment variable
- Deployments prior to patch commit 234d9aa
Discovery Timeline
- 2026-05-18 - CVE-2026-47092 published to NVD
- 2026-05-18 - Last updated in NVD database
- Patch reference - Fixed in commit 234d9aad919b51326a43bcf90b45ae35c23afc30 via pull request #487
Technical Details for CVE-2026-47092
Vulnerability Analysis
Claude HUD performs a Windows version lookup by invoking cmd.exe through Node.js execFile(). The implementation resolves the command interpreter path from the COMSPEC environment variable without validation. An attacker with local access can override COMSPEC to point to any executable on disk. When claude-hud runs its version check, execFile() launches the attacker-controlled binary instead of the legitimate Windows command processor.
The vulnerability is categorized as CWE-427: Uncontrolled Search Path Element. The application implicitly trusts a user-controlled environment variable to locate a critical system binary. This pattern bypasses any sandboxing assumptions tied to launching cmd.exe directly.
Root Cause
The root cause is reliance on the COMSPEC environment variable to locate the Windows command interpreter. Node.js execFile() does not perform shell parsing, but it executes whatever path is supplied as the executable argument. By reading COMSPEC without canonicalization or allowlisting, claude-hud allows substitution of the interpreter with arbitrary binaries.
Attack Vector
Exploitation requires local access and the ability to set environment variables in the user session. An attacker sets COMSPEC to the path of a malicious executable, then triggers claude-hud functionality that invokes the Windows version lookup. The execution context matches the user running claude-hud, enabling code execution within that user's security boundary.
// Security patch in src/git.ts — harden links and Windows version lookup (#487)
.replace(/^git@([^:]+):/, 'https://$1/')
.replace(/\.git$/, '');
if (httpsBase.startsWith('https://')) {
- branchUrl = `${httpsBase}/tree/${branch}`;
+ branchUrl = `${httpsBase}/tree/${encodeURIComponent(branch)}`;
}
} catch {
// No remote or not GitHub
// Source: https://github.com/jarrodwatts/claude-hud/commit/234d9aad919b51326a43bcf90b45ae35c23afc30
// Security patch in src/transcript.ts — adds path canonicalization (#487)
return path.join(getHudPluginDir(homeDir), 'transcript-cache', `${hash}.json`);
}
+function canonicalizeTranscriptPath(transcriptPath: string): string | null {
+ try {
+ return fs.realpathSync(transcriptPath);
+ } catch {
+ return null;
+ }
+}
+
function readTranscriptFileState(transcriptPath: string): TranscriptFileState | null {
try {
const stat = fs.statSync(transcriptPath);
// Source: https://github.com/jarrodwatts/claude-hud/commit/234d9aad919b51326a43bcf90b45ae35c23afc30
The patch hardens link generation through encodeURIComponent() and introduces canonicalizeTranscriptPath() using fs.realpathSync() to resolve symbolic links and validate filesystem paths before use. See VulnCheck's advisory for additional technical detail.
Detection Methods for CVE-2026-47092
Indicators of Compromise
- Modifications to the COMSPEC environment variable in user or process scope on Windows hosts running claude-hud
- execFile() or child process spawns originating from claude-hud where the executable path is not C:\Windows\System32\cmd.exe
- Unexpected child processes launched by the Node.js runtime hosting claude-hud during version check operations
Detection Strategies
- Monitor process creation events on Windows endpoints for claude-hud child processes that resolve through a non-default COMSPEC value
- Audit environment variable changes scoped to user sessions, focusing on COMSPEC and other interpreter-path variables
- Correlate claude-hud execution with the presence of suspicious binaries placed in user-writable directories that match a modified COMSPEC
Monitoring Recommendations
- Enable Windows Event Log auditing for process creation (Event ID 4688) with command-line capture enabled
- Track Node.js process trees originating from claude-hud installations and alert on non-standard executables
- Maintain inventory of claude-hud versions across endpoints and flag deployments older than the 234d9aa patch
How to Mitigate CVE-2026-47092
Immediate Actions Required
- Upgrade claude-hud to a build that includes commit 234d9aa or later
- Restrict local accounts that can run claude-hud to trusted users until patches are applied
- Reset and audit the COMSPEC environment variable on affected Windows hosts to ensure it points to %SystemRoot%\System32\cmd.exe
Patch Information
The vendor patched the vulnerability in commit 234d9aad919b51326a43bcf90b45ae35c23afc30, released through pull request #487. The fix hardens the Windows version lookup path and adds canonicalization for transcript file paths. Reference the original issue report #485 for context.
Workarounds
- Explicitly set COMSPEC to the absolute path of the legitimate cmd.exe in any session running claude-hud
- Apply Windows AppLocker or Windows Defender Application Control policies to block execution of unsigned binaries from user-writable directories
- Avoid running claude-hud under privileged accounts on shared or multi-user Windows hosts
# Verify and pin COMSPEC to the legitimate Windows command interpreter
setx COMSPEC "%SystemRoot%\System32\cmd.exe"
# Confirm installed claude-hud version is patched
npm ls claude-hud
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

