T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:25- Finding
Direct Access to a Root-Owned Authentication Token File
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 25-34
Vulnerability Type: Sensitive credential access beyond least-privilege requirements
Risk Level: HighRelevant snippet translated from the source documentation:
markdown - **Token file:** `/root/.config/clawhub/config.json` - **ClaWHub CLI:** `/root/.npm/_npx/ce38bf0ef4fd88c6/node_modules/.bin/clawhub` - **Workspace:** `/workspace` - **Account:** tianheihei002 ### Execution Process 1. Read `/root/.config/clawhub/config.json` to confirm that the token is valid.Technical Analysis
The Skill explicitly instructs the agent to read an authentication configuration owned by the root account. Reading the token contents is unnecessary for checking authentication status because the documented
clawhub whoamioperation can validate the active session through its exit status and sanitized output.Loading a root-owned credential into an agent's context unnecessarily expands the credential's exposure boundary. Prompt injection, unsafe logging, diagnostic output, or another malicious Skill active in the same context could capture the token. The issue is especially significant if the Skill runs with root privileges, as suggested by the configured paths.
Attack Path
- A user or scheduled agent run activates the synchronization Skill.
- The agent follows the instruction to open
/root/.config/clawhub/config.json. - The ClaWHub token is loaded into the agent or tool execution context.
- A malicious instruction, compromised tool, or unsafe log captures the token.
- The attacker uses the token to authenticate to ClaWHub.
- The attacker performs registry operations permitted to the associated account.
Impact Assessment
Exploitation could expose the ClaWHub authentication token for account
tianheihei002. The resulting privileges depend on the token's server-side permissions, but may include reading private registry data, ...[truncated 272 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to read or parse
/root/.config/clawhub/config.json. - Validate authentication exclusively through
clawhub whoami, using its exit status and sanitized output. - Run the Skill under a dedicated, unprivileged service account rather than root.
- Store the token in an operating-system credential store or protected secret manager.
- Scope the token to the minimum required registry permissions and repositories.
- Ensure commands and reports never print environment variables, request headers, configuration contents, or token values.
- Rotate the existing token if it may previously have been exposed to agent context or logs.
- Remove the instruction to read or parse
