T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- scripts/session-utils.js:82
- Finding
- Send-enabled defaults permit account-changing Hinge actions without explicit opt-in<![CDATA[ ## Vulnerability Details **File Location**: `scripts/session-utils.js:4, 82-109`; `scripts/onboarding.js:85-91`; `scripts/discover-autopilot.js:1017-1069, 1673-1677, 1780-1918` **Vulnerability Type**: Unsafe authorization defaults and excessive autonomous privileges **Risk Level**: High The same affected implementation is duplicated under `clawhub-upload/barney/scripts/`. ### Vulnerable Code ```javascript // scripts/session-utils.js const DEFAULT_AGENT_MODE = 'full_access'; function defaultConfig() { return { // ... automation: { agentMode: DEFAULT_AGENT_MODE, observeBeforeTakeover: true, observeWarmupSeconds: 90, observeSnapshotIntervalMs: 1500, allowComposeFill: false, allowAutoSendReplies: false, allowAutoSendRoses: false, allowAutoSendLikes: true, allowAutoSkipPasses: true, defaultSource: 'discover', activeTabs: ['chats', 'likes', 'discover', 'standouts'], trustMode: 'send', sampleMatches: 8, profileScrollSteps: 3, strongYesScoreThreshold: 7, maybeScoreThreshold: 5, maybeSendScoreThreshold: 5.6, photoLikeTargetRatio: 0.7, likeCommentRatio: 0.3, beautyFloor: 6, discoverBeautySendThreshold: 6, roseScoreThreshold: 8, maxRepliesPerCycle: 2, replyCooldownMinutes: 360, maxDiscoverProfilesPerCycle: 2, maxLikesPerCycle: 2, maxStandoutsPerCycle: 1, quickScreenBudgetMs: 8000, runForeverSleepMs: 4000, tasteRefreshEveryCycles: 5 } }; } ``` ```javascript // scripts/onboarding.js if (init) { ensureDir(paths.root); if (!fs.existsSync(paths.configPath)) { writeJson(paths.configPath, defaultConfig()); console.log(`Created ${paths.configPath}`); } else { console.log(`Exists ${paths.configPath}`); } ``` ```javascript // scripts/discover-autopilot.js function shouldSendLike(evaluation, options) { if (options.trustMode !== 'send') return false; i ...[truncated 3396 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Change the defaults to `trustMode: "queue"` and set every `allowAuto*` option to `false`. 2. Introduce an explicit read-only default mode rather than defaulting to `full_access`. 3. Require an affirmative, current-session confirmation before enabling likes, skips, replies, comments, or roses. 4. Reject noninteractive autonomous launch unless a short-lived consent token or explicit command-line flag is supplied. 5. Do not infer authorization merely from persisted configuration created by onboarding. 6. Display a clear summary of enabled actions, affected tabs, duration, and per-cycle limits before launch. 7. Add a dry-run mode and require the user to review proposed actions before transitioning to send mode. 8. Record consent time, scope, and expiration separately from ordinary preferences. ]]>
