Permission-based sandboxing
Why it matters
Without a permission system, every plugin receives the same access to storage, hooks, and configuration regardless of what it actually needs. Users cannot review what a plugin will do before installing it, operators cannot audit which plugins have access to sensitive data, and the host cannot prevent a plugin from exceeding its intended scope. OWASP A01 (Broken Access Control) and CWE-284 cover exactly this pattern. The absence of declared and enforced permissions also eliminates the ability to revoke capabilities selectively — any restriction requires removing the entire plugin.
Severity rationale
High because undeclared and unenforced permissions give every plugin identical unrestricted access, preventing users from making informed installation decisions or operators from applying least-privilege controls.
Remediation
Add a permissions array to the plugin manifest schema and validate it at load time. Capabilities not listed in the manifest must produce an error when accessed, not silently succeed.
// Plugin manifest:
{
"name": "my-plugin",
"permissions": ["hooks:read", "storage:write", "config:read"]
}
// Host enforces permissions:
function createPluginContext(plugin: PluginManifest): PluginContext {
return {
hooks: plugin.permissions.includes('hooks:read')
? hookRegistry : throwPermissionError('hooks:read'),
storage: plugin.permissions.includes('storage:write')
? scopedStorage(plugin.name) : readOnlyStorage(plugin.name),
};
}
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 Plugin / Extension Architecture Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-829 — Inclusion of Functionality from Untrusted Control Sphere — permission-based sandboxing constrains what untrusted plugin code can do
- cwe · CWE-284 — Improper Access Control — permissions must be declared and enforced, not purely informational
- owasp:2021 · A01 — Broken Access Control
Taxons
History
- 2026-04-18·v1.0.0·Initial import from plugin-extension-architecture·automated