# Guard silently falls back to unrestricted

Check every guard, sandbox, or permission branch for a fallback or nested check that drops the restriction

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; one confirmed bounty: $3,495; latest 2026-06-18. Updated 2026-10-24._

## How it works
A security control is supposed to enforce one policy everywhere. Instead, one path through the control skips or weakens enforcement while still looking protected. The caller, config, or reported status says "restricted," but the actual execution runs with fewer or no limits. The broken assumption is that the presence of a guard means the guard applies. In practice the guard only covers the branch it was written into, or it degrades to a weaker backend when its dependency is missing.

## Where it shows up
- A restriction (revert, deny, isolation) nested inside one target/address branch rather than applied to all calls [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md)
- `if not available` / `except` paths that return a weaker backend but keep the same label or config [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md)
- Debug/introspection surfaces (inspector, debugger) still reachable inside a sandbox [E1](https://bugbountylibrary.com/r/h1%3A2078581.md)
- Internal-only constructors or symbols that exempt an object from checks [E1](https://bugbountylibrary.com/r/h1%3A2078581.md)
- Status fields (`sandbox_type`, `network=False`, `allowed_paths`) reported unchanged after fallback [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md)
- `delegatecall` allowed to any address from a guarded contract [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md)

## How to review
Identify the policy the control claims to enforce, then trace every exit path and confirm each one enforces it. The invariant: no path through the guard may execute with weaker permissions than the declared policy, and failure to enforce must fail closed. Specifically:
- Is the deny check global, or scoped to one branch/target? [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md)
- Does the fallback backend install the same filesystem/network boundary, or only rlimits? [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md)
- Are introspection/debug interfaces disabled under the sandbox? [E1](https://bugbountylibrary.com/r/h1%3A2078581.md)
- Can the guarded contract's own storage be overwritten via delegatecall to an unchecked address? [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md)
- Does reported status match actual enforcement? [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md)

## Variants seen
- Guard check scoped to one branch, bypassed via delegatecall to another address [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md)
- Sandbox silently degrades to unrestricted subprocess when kernel feature unavailable [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md)
- Permission model bypassed via still-enabled inspector mutating internal state [E1](https://bugbountylibrary.com/r/h1%3A2078581.md)

## Impact and severity
Led to full sandbox escape and arbitrary filesystem/process access [E1](https://bugbountylibrary.com/r/h1%3A2078581.md), complete bypass of multisig guard restrictions [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md), and reads outside allowed paths plus network access despite `network=False` [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md). Severity is high because the control reports itself as active; the mismatch between declared and actual policy hides the gap from operators and reviewers.

## Why fixes fail
Fallbacks that log a warning but continue [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md) and checks placed inside a single branch [E2](https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md) leave the unsafe path reachable; the fix must remove the path, not just note it.

## Evidence
- E1: https://bugbountylibrary.com/r/h1%3A2078581.md
- E2: https://bugbountylibrary.com/r/c4%3A2023-12-autonolas%3AH-02.md
- E3: https://bugbountylibrary.com/r/ghsa%3AGHSA-6jcq-6546-qrrw.md
