Resource limits enforced
Why it matters
Without execution timeouts or storage quotas, a single misbehaving plugin — whether malicious or accidentally written with an infinite loop — can block the Node.js event loop, starve other request handlers, or fill disk. CWE-400 (Uncontrolled Resource Consumption) and ISO 25010 performance-efficiency.resource-utilization both require that resource consumption be bounded. In a multi-tenant plugin environment this is especially severe: one customer's plugin degrades service for all customers, and the host has no mechanism to identify or interrupt the culprit.
Severity rationale
Medium because unlimited plugin resource consumption — no timeouts, no storage quotas, no CPU caps — allows a single plugin to monopolize host resources and deny service to all other users.
Remediation
Start with handler execution timeouts — they are the highest-impact resource limit and require no additional infrastructure. Race each handler invocation against a setTimeout reject and surface a clear timeout error attributing it to the specific plugin.
async function invokeWithTimeout(
handler: Function,
context: HookContext,
timeoutMs: number = 5000
): Promise<void> {
const timeout = new Promise<never>((_, reject) =>
setTimeout(() => reject(new Error(`Handler timed out after ${timeoutMs}ms`)), timeoutMs)
);
await Promise.race([handler(context), timeout]);
}
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-400 — Uncontrolled Resource Consumption — plugin handlers with no timeouts or quotas can exhaust host resources
- iso-25010:2011 · performance-efficiency.resource-utilization — Resource utilization — resource limits prevent plugins from monopolizing CPU, memory, or storage
Taxons
History
- 2026-04-18·v1.0.0·Initial import from plugin-extension-architecture·automated