T05 · Unauthorized Access and Privilege Escalation
- Location
references/desktop-shell-prompt.md:20- Finding
Inherited Node.js Security Controls Are Explicitly Disabled
- Content
View full analysis
Vulnerability Details
File Location:
references/desktop-shell-prompt.md, lines 20-23
Vulnerability Type: Security-control bypass
Risk Level: MediumVulnerable Code
text - 自动拉起时,用解析出的 `harnessHome` + `nodeBin` 拼出 CLI 命令: `NODE_OPTIONS="" "<nodeBin>" "<harnessHome>/apps/cli/lib/bin.js" web --port <port>` (保留 `NODE_OPTIONS=""` 以规避某些托管环境给 node 注入"安全删除"钩子、导致 Harness 写盘 失败的问题;若该环境无此问题可省略,但需在 README 说明。具体钩子成因与边界见 `deepseek-harness-windows-deploy` 技能的「安全与防护边界」。)Technical Analysis
The Skill directs the generated wrapper to clear
NODE_OPTIONSbefore launching DeepSeek Harness. It explicitly identifies the purpose as bypassing a security hook injected by some managed environments.NODE_OPTIONScan contain organization- or platform-provided Node.js runtime controls, including preload modules, policy enforcement, monitoring, or filesystem protection. Clearing the entire variable removes every inherited option, not only a verified incompatible setting. This violates least privilege because an Electron wrapper does not inherently require the removal of managed runtime controls.Although this does not grant administrator privileges, it can remove restrictions from the Harness process and all plugins loaded by that process. They would then operate with the full permissions of the current user.
Attack Path
- A managed environment supplies a protective module or policy through
NODE_OPTIONS. - The agent implements the documented launch command.
- The wrapper starts Harness with
NODE_OPTIONSset to an empty value. - The inherited protection is omitted from the Harness runtime.
- Harness or a loaded plugin performs filesystem or process operations that the removed control would otherwise have blocked.
Impact Assessment
The affected Harness process and its plugins may obtain unrestricted access to resources available to the current operating-system us ...[truncated 284 chars]
- A managed environment supplies a protective module or policy through
- Remediation
View remediation
Remediation Suggestions
- Preserve inherited
NODE_OPTIONSby default. - Do not clear the complete variable merely to address an unidentified compatibility problem.
- Diagnose the exact incompatible option and document why it is unsafe or incompatible.
- If an override is essential, require explicit, informed user approval before changing the environment.
- Remove only the verified incompatible option while retaining unrelated security and monitoring controls.
- Display the original and proposed effective options to the user without exposing secrets.
- Add a configuration switch that defaults to preserving the environment.
- Document the permissions and protections lost when the override is enabled.
- Prefer correcting Harness filesystem configuration or permissions instead of bypassing runtime protections.
- Preserve inherited
