A builtin allowlist is the set of host modules a sandbox is permitted to load. In Node.js sandboxes, this is a critical control because admitted modules can expose host state or mutating functions. A wildcard entry broadens exposure and must be treated as a high-risk configuration choice.
Expanded Definition
A builtin allowlist is the explicit set of host modules or built-in APIs a sandboxed runtime is allowed to load. In practice, it acts as a guardrail around what privileged functionality remains reachable when code is executed in a constrained environment. In Node.js-style sandboxes, the distinction matters because a module that appears harmless may still expose file access, process state, network primitives, or mutation pathways into the host. That makes the allowlist more than a compatibility setting; it is a security boundary that shapes what the sandbox can observe and influence.
Usage in the industry is still evolving because some teams treat allowlists as a static configuration file, while others generate them dynamically from policy, test coverage, or application-specific trust tiers. The strongest approach is to treat the allowlist as a minimal, reviewed control tied to the sandbox's intended function, not as a convenience mechanism for getting code to run. NIST Cybersecurity Framework 2.0 frames this kind of restriction within broader access and protective governance expectations, even when it does not name the pattern directly. The most common misapplication is using a wildcard or overly broad builtin allowlist, which occurs when teams prioritise runtime compatibility over restricting host capabilities.
Examples and Use Cases
Implementing a builtin allowlist rigorously often introduces compatibility friction, requiring organisations to weigh sandbox safety against developer convenience and runtime flexibility.
- A server-side rendering service permits only harmless standard-library modules, blocking filesystem and child-process access so untrusted templates cannot reach host state.
- An internal plugin platform allows a narrow set of builtins for logging and JSON handling, while excluding modules that could mutate environment variables or spawn processes.
- A multi-tenant automation runner loads only preapproved modules for network calls and time functions, reducing the chance that tenant code can inspect secrets or pivot laterally.
- A security-reviewed Node.js sandbox maintains a versioned allowlist, with changes approved through code review and validated against test cases that confirm forbidden modules remain unavailable.
- An application using Node.js runtime guidance and internal hardening rules uses the allowlist to keep compatibility-limited functionality available without exposing process control or host mutation.
In each case, the allowlist is doing more than filtering imports. It is defining the sandbox's trust boundary and, by extension, the blast radius if sandboxed code is malicious or simply buggy. Good practice is to document why each builtin is admitted, what data or capability it exposes, and whether a narrower alternative exists. Where teams allow exceptions, those exceptions should be temporary, reviewed, and traceable to a specific business need rather than left as default inheritance from a broader base image or framework preset. Authoritative hardening guidance from OWASP Cheat Sheet Series is useful here because it repeatedly emphasises minimisation and secure defaults across application contexts.
Why It Matters for Security Teams
Security teams need to understand builtin allowlists because sandboxing failures often begin with a mistaken assumption that isolation alone is enough. If a sandbox can still load powerful host modules, then the boundary is porous even when the runtime appears constrained. That creates risk for secret exposure, privilege escalation, data tampering, and policy bypass, especially in code-execution platforms, plugins, and agentic workflows where untrusted instructions may be translated into runtime actions. This is also where identity and NHI governance intersect: an agent, job runner, or automation service account may be legitimate, but the builtins it can invoke determine whether that identity remains bounded or becomes an uncontrolled execution path.
Teams should therefore treat the allowlist as part of least privilege, change control, and secure-by-default configuration. It should be reviewed alongside dependency policy, secrets handling, and operational logging so that newly added builtins are not quietly widening the attack surface. CISA's guidance on software and runtime hardening reinforces the same principle: remove unnecessary functionality before relying on monitoring to catch abuse. Organisations typically encounter the consequences only after a sandbox escapes its intended boundary or a plugin abuses an admitted builtin, at which point the builtin allowlist becomes operationally unavoidable to investigate and contain the breach.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access aligns with limiting which builtins a sandbox may reach. |
| OWASP Non-Human Identity Top 10 | NHI guidance supports minimizing runtime capabilities for non-human execution identities. | |
| OWASP Agentic AI Top 10 | Agentic AI guidance addresses tool and execution constraints for autonomous software. | |
| NIST AI RMF | AI RMF governance applies when model-driven systems execute code through constrained runtimes. | |
| NIST SP 800-53 Rev 5 | CM-7 | Functionality minimization is directly relevant to allowlisting builtins in sandboxes. |
Restrict sandbox module access to the minimum required and review exceptions as privileged access changes.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org