T05 · Unauthorized Access and Privilege Escalation
- Location
clawhub.yaml:14- Finding
Mandatory LinkedIn Session Token Violates Least-Privilege Access
- Content
View full analysis
Vulnerability Details
File Location:
clawhub.yaml:14-17
Related Location:SKILL.md:37-50
Vulnerability Type: Excessive credential requirement and inconsistent authentication configuration
Risk Level: Mediumyaml required_env: - TRADEGPT_API_KEY - LINKEDIN_SESSION_TOKEN primary_env: TRADEGPT_API_KEYTechnical Analysis
The package manifest requires
LINKEDIN_SESSION_TOKENto be supplied to the Skill runtime. This conflicts withSKILL.md, where the same credential is described as optional and the documented LinkedIn integration uses user-authorized OAuth.A raw authenticated session token can provide broader access than a narrowly scoped OAuth access token. Requiring it for installation or execution unnecessarily places a reusable account credential in the runtime environment, where the Skill host, future implementation code, subprocesses, extensions, or compromised dependencies could potentially read it.
The audited package contains documentation and templates rather than executable scripts, and no credential theft or exfiltration implementation was identified. The vulnerability is therefore the excessive credential requirement and resulting exposure boundary, not evidence that the current package actively steals the token.
Attack Path
- A user installs or configures the Skill and is instructed by the manifest to provide
LINKEDIN_SESSION_TOKEN. - The session token is placed in the Skill runtime environment.
- A runtime component, future Skill implementation, compromised dependency, or other process with access to that environment reads the credential.
- The exposed token is replayed against LinkedIn while it remains valid.
- The attacker acts through the authenticated LinkedIn session within the permissions and security restrictions associated with that token.
This path requires an additional component capable of reading or disclosing environment variables; no such ...[truncated 772 chars]
- A user installs or configures the Skill and is instructed by the manifest to provide
- Remediation
View remediation
Remediation Suggestions
- Remove
LINKEDIN_SESSION_TOKENfromrequired_env. - Use LinkedIn's supported OAuth authorization flow with explicit user consent.
- Request only the minimum scopes needed for the selected operation, separating message generation from message delivery.
- Store OAuth tokens in a dedicated secret manager rather than general environment variables where supported.
- Use short-lived access tokens and support immediate revocation and rotation.
- Never request browser cookies, raw session tokens, or other credentials that can reproduce a full authenticated session.
- Make
clawhub.yamlandSKILL.mdconsistent about whether LinkedIn integration is optional and which authentication method it uses. - Ensure the message-generation feature works without any LinkedIn credential; request OAuth authorization only when the user explicitly enables LinkedIn API operations.
- Prevent credentials from appearing in logs, generated messages, diagnostic output, or third-party API requests.
- Add automated manifest validation to reject session-cookie or session-token requirements when a scoped OAuth mechanism is available.
- Remove
