Safeguard
Security Guides•

What does gVisor not protect against?

gVisor blocks workloads from the host kernel but not from attacks on the runtime stack, CPU side channels, or the data inside the sandbox. Know the gaps.

Safeguard Security Team
4 min read

gVisor does not protect against attacks on components that start the sandbox, CPU side channels such as Spectre style attacks, or an exploit inside the sandboxed workload that reaches whatever the sandbox is allowed to touch. It targets one thing: stopping untrusted code from exploiting the host's Linux kernel.

What gVisor is for

gVisor describes itself as an open source workload isolation solution for running untrusted code, containers and applications. It is an application kernel that runs in user space. It intercepts the workload's system calls and page faults and handles them with its own Go implementation, called the Sentry, which makes only limited calls to the host kernel.

Because the workload never talks to the host kernel directly, a whole class of kernel exploits has no path in. That is the protection. The rest of this post covers what falls outside it.

The gaps, from the project's own documentation

GapWhat it means
Higher level componentsAn exploit in the container runtime that starts the container without gVisor bypasses the sandbox. The docs give containerd as an example
CPU side channelsgVisor intercepts system calls and page faults only, so the workload can use the CPU freely within cgroup limits. Mitigation sits at the host kernel or hardware level
Exploits inside the workloadIf a web app inside the sandbox is exploited, the attacker still has what the sandbox grants
Insecure architectureThe security model says a sandbox is not a substitute for a secure architecture
Host servicesAn exploitable network service on the host stays exploitable

The same documentation adds that different customer workloads should run in different sandboxes, so a malicious customer cannot leak data from, or exploit, another customer's workload. It also mentions a runtime monitoring feature that can act as an intrusion detection mechanism for the sandboxed workload.

How to plan around the gaps

Keep the launcher honest. If the thing that decides whether to use the sandbox can be tricked into skipping it, the sandbox is optional. Restrict who can create workloads, and verify the runtime in use.

Treat the inside as compromised. Give the sandbox only the data and credentials the job needs. Mount inputs read only. Do not place long lived secrets inside.

Separate tenants. One sandbox per customer or per job, not one shared sandbox.

Control the network. A sandboxed workload with open network access can still send out what it can read.

Patch the host. gVisor reduces exposure to the host kernel but does not remove the need to keep the host and its services current. For a related question, see whether containers need the host kernel patched.

A short checklist

  1. Confirm the runtime is actually gVisor for the workloads you intend, not just configured somewhere.
  2. Give each tenant or job its own sandbox.
  3. Minimize mounts and secrets.
  4. Restrict outbound network access.
  5. Keep the host patched and watch for runtime alerts.

For a wider comparison, read which sandbox fits which code and the gVisor runtime deep dive.

Safeguard's dependency and image scanning looks at what goes into the workload, not at the sandbox. Try the free scan at gold.safeguard.sh/scan.

Quick check

Does gVisor replace a virtual machine?

Not by definition. gVisor's documentation describes it as different from both a hypervisor and a system call filter, and lists the cases it does not cover.

If the workload is exploited inside gVisor, what can the attacker reach?

Whatever the sandbox was configured to allow, such as mounted data and network access. gVisor limits escape to the host, not access within the sandbox.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.