activeTab is prioritized over static permissions
Why it matters
Static host permissions show a scary install-time warning ('Read and change your data on specific websites') and persist even when the user hasn't triggered the extension. activeTab, by contrast, grants temporary access only to the tab that is active at the moment the user explicitly invokes the extension — no persistent grant, no install warning, and no access to background tabs. CWE-250 governs this: a static host permission is an execution privilege that persists indefinitely, while activeTab is just-in-time. Chrome's published permission guidelines strongly prefer activeTab for any user-gesture-driven workflow.
Severity rationale
High because static host permissions persist beyond user intent, granting background access to page content even when the extension is idle — an unnecessary privilege escalation.
Remediation
Replace static host permissions with activeTab in manifest.json for any functionality triggered by a browser-action click, context menu item, or keyboard shortcut.
{ "permissions": ["activeTab"] }
Then in your background script, call chrome.tabs.query({ active: true, currentWindow: true }) inside the action click handler — the activeTab grant is available only within that user gesture's event scope.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Extension Permissions & Security Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-250 — Execution with Unnecessary Privileges
- owasp:2021 · A01
- external · chrome-active-tab — Chrome Extensions: activeTab Permission
Taxons
History
- 2026-04-18·v1.0.0·Initial import from extension-permissions-security·automated