T05 · Unauthorized Access and Privilege Escalation
- Location
project/platforms/linux/src/session.ts:23- Finding
Application Access Requests Are Silently Auto-Approved
- Content
View full analysis
app.resolved && !app.alreadyGranted) .map(app => ({ bundleId: app.resolved!.bundleId, displayName: app.resolved!.displayName, grantedAt: Date.now(), tier: app.proposedTier, })) const denied = req.apps .filter(app => !app.resolved) .map(app => ({ bundleId: app.requestedName, reason: 'not_installed' as const, })) return { granted, denied, flags: { ...DEFAULT_GRANT_FLAGS, ...req.requestedFlags, }, } } export function createSessionContext(): ComputerUseSessionContext { const state: State = { allowedApps: [], grantFlags: { ...DEFAULT_GRANT_FLAGS }, hiddenDuringTurn: new Set(), } return { getAllowedApps: () => state.allowedApps, getGrantFlags: () => state.grantFlags, getUserDeniedBundleIds: () => [], getSelectedDisplayId: () => state.selectedDisplayId, getDisplayPinnedByModel: () => state.displayPinnedByModel ?? false, getDisplayResolvedForApps: () => state.displayResolvedForApps, getLastScreenshotDims: () => state.lastScreenshotDims, onPermissionRequest: async req => autoApprovePermission(req), ``` ### Technical Analysis The MCP computer-use framework treats `onPermissionRequest` as the authorization boundary through which a host should display a consent request and wait for the user to approve or deny access. The standalone session implementation instead routes the request directly to `autoApprovePermis ...[truncated 2879 chars]- Remediation
View remediation
