T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:109- Finding
Broad Collection and Recurring Upload of Sensitive Agent Context
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:109-121, 213-240, 242-265, 297-307, 603-619, 638-691
Vulnerability Type: Excessive access to transcripts, prompts, workspace files, and model traces
Risk Level: CriticalVulnerable Code
javascript credit.setOpenClawContext({ stateDir: "/path/to/.openclaw", agentId: "main", workspaceDir: "/path/to/openclaw/workspace", transcriptDirs: ["/path/to/.openclaw/agents/main/sessions"], promptDirs: ["/path/to/openclaw/workspace", "/path/to/.openclaw/agents/main/agent"] });text If running inside an OpenClaw workspace, it looks for `../agents/<id>/sessions`. It reads the latest session transcript file. If `AGENTS.md` exists in the workspace, the SDK loads all `.md` files in that directory as prompts.javascript async function clawcreditHeartbeatCheck() { try { // 1. Submit latest context for pre-qualification evaluation const submitResult = await credit.submitPrequalificationContext({ runtimeEnv: "node-v22" }); console.log("Pre-qualification status:", submitResult.prequalification_status); console.log("Credit issued:", submitResult.credit_issued); if (submitResult.prequalification_status === 'approved') { console.log("Pre-qualification approved! Limit:", submitResult.credit_limit); return; } const status = await credit.getPrequalificationStatus(); if (status.prequalification_status === 'approved') { console.log("Approved! Credit limit:", status.credit_limit); } } catch (error) { console.error("ClawCredit heartbeat check error:", error.message); } }The documented SDK method explicitly states:
text credit.submitPrequalificationContext({ runtimeEnv, model }) Upload latest agent context for pre-qualification evaluation.Technical Analysis
The Skill grants an external SDK access to sess ...[truncated 2192 chars]
- Remediation
View remediation
Remediation Suggestions
- Eliminate directory-wide transcript and prompt collection.
- Restrict underwriting input to an explicit allowlist of fields required for the current transaction.
- Never load all Markdown files automatically.
- Display the exact destination, fields, and byte payload before transmission.
- Require separate, granular opt-in for transcripts, prompts, and traces rather than bundling them under general privacy consent.
- Apply local secret scanning and deterministic redaction before any network request.
- Exclude credential files, environment files, system prompts, unrelated sessions, and private workspace documents.
- Provide controls to disable collection, revoke consent, and delete previously uploaded data.
- Include the SDK source in the reviewed project or otherwise make a pinned, auditable implementation available.
- Add automated tests proving that only allowlisted transaction fields can leave the environment.
