The clearest signs are inconsistent behaviour across runtime object types, unexpected access outside the intended sandbox, and package inventories that cannot confirm which projects still depend on the vulnerable library. If the control cannot be verified at runtime and in the bill of materials, it is not trustworthy.
How an untrusted-code execution control fails in the real world
These failures usually show up where the control meets actual software diversity, not in a clean lab test. If a policy only works for one object type, one runtime, or one packaging path, attackers and buggy integrations will find the gap. The practical question is whether execution is still bounded, observable, and attributable when the code path changes.
In a healthy control, the same trust boundary should hold across the code paths that matter: package import, plugin loading, script execution, sandboxed runtime invocation, and any related dependency chain. When that boundary weakens, the failure is usually partial at first, then systemic as teams assume coverage they have not actually verified.
One common sign is that the control cannot consistently explain what is allowed to run and under which runtime object type. If package metadata, runtime policy, and build-time inventory disagree, the control may be present in name only. That is especially serious when the package inventory cannot confirm which projects still depend on a vulnerable library, because the enforcement story and the exposure story have drifted apart. In that state, credentialed execution paths that lead to remote code execution become much easier to miss.
A second sign is unexpected access outside the intended sandbox. If code can read files, reach network resources, or invoke privileged functions that were supposed to be blocked, the boundary has already failed operationally. The same concern applies when a supposedly constrained runtime can still touch secrets, environment variables, or host-level resources, because that means the control is limiting appearance rather than capability. Silent code execution cases are useful reminders that the absence of an obvious crash does not mean the boundary held.
A third sign is inconsistent behaviour across equivalent runs. If the same untrusted code is blocked in one environment, allowed in another, and only intermittently logged, the policy is too dependent on deployment context to be trusted. That inconsistency often points to missing mediation at the execution layer, weak allowlisting, or a control that is implemented in tooling but not enforced where the runtime actually makes the decision.
Why runtime verification and bill of materials evidence both matter
The strongest indicator that a control is failing is that you cannot verify it at two different layers: runtime and inventory. Runtime checks tell you whether execution is actually constrained now; bill of materials and dependency data tell you where the vulnerable component still exists and what depends on it. If one layer says “blocked” but the other cannot identify the affected projects, you do not have a trustworthy control, only an assumption.
This matters because untrusted-code controls often fail silently when the organisation loses traceability across packages, builds, and deployed artifacts. A vulnerable library may be fixed in one repository while remaining reachable through another dependency chain, or a sandbox policy may exist for one service but not for a sibling service using the same component. When inventories are incomplete, teams tend to overestimate coverage and understate blast radius.
Practitioners should treat any inability to reconcile runtime enforcement with software inventory as evidence of control failure, not just a documentation problem. That reconciliation is what separates a real execution barrier from a paper control.
What the evidence is telling you operationally
In practice, the failure pattern is a mismatch between expected containment and observed behaviour. The most useful signals are: execution that varies by object type, access that escapes the sandbox, and dependency records that cannot prove exposure has been eliminated. Those signals together indicate that the control is not reliably enforcing intent across the full path from package intake to runtime use.
When that happens, the problem is usually broader than one bad rule. It often means the organisation has not defined the control at the right abstraction layer, has not tested it against representative runtime objects, or has not connected build inventory to deployment reality. A control that cannot be independently verified is hard to defend, even if it appears to work in isolated tests.
Risk and Threat Considerations
Partial failure of untrusted-code controls creates a false sense of containment, which is often more dangerous than a clearly absent control. Once an attacker or malicious package can cross the intended boundary, the next steps are usually secret access, lateral movement, or code execution with the privileges of the hosting process.
Failure mechanism: The control is bypassed through inconsistent enforcement across runtime object types, sandbox escape paths, or incomplete dependency visibility, so untrusted code reaches resources the policy was meant to isolate.
Impact: The organisation may continue to ship or execute vulnerable code without knowing where it remains reachable, which increases the likelihood of compromise, secret exposure, and uncontained execution.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V15 — Secure Coding and Architecture | Untrusted-code execution controls depend on secure runtime containment and architecture. |
| V16 — Security Logging and Error Handling | The question hinges on whether failed enforcement is observable in practice. | |
| Recommendation — Validate runtime isolation and deny unexpected execution paths through the application design. Log sandbox escapes and policy denials so control failures are detectable and reviewable. | ||
| NIST SP 800-53 Rev 5 | SI-7 — Software, Firmware, and Information Integrity | Execution of untrusted code is fundamentally an integrity-control problem. |
| CM-8 — System Component Inventory | The answer depends on knowing which projects still depend on the vulnerable library. | |
| Recommendation — Require integrity checks before allowing code to run or be loaded. Maintain an accurate component inventory and reconcile it with exposed dependencies. | ||
| CIS Controls v8 | CIS-2 — Inventory and Control of Software Assets | Dependency visibility and software inventory are central to confirming exposure. |
| Recommendation — Track software assets and dependencies so vulnerable libraries can be identified and removed. | ||
Practitioner Guidance
What to verify: Test the control against the runtime object types you actually use, not just the idealised case in the security design. Then confirm that the package inventory can identify every project still depending on the vulnerable component, including indirect dependencies and alternate build paths.
Decision rule: If you cannot demonstrate both runtime containment and dependency visibility, treat the control as unproven and prioritise containment and inventory repair before relying on the control for risk acceptance.
Common mistake: Teams often stop at a successful sandbox test or a clean scan report. That is not enough if the same code can execute through another object type, another environment, or another package route.
Practitioner takeaway: A trustworthy untrusted-code control is one you can prove at execution time and in the software inventory at the same time; if either view is missing, the control should be treated as failing until proven otherwise.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org