---
title: "Server-side sandboxing: Virtual machines"
description: "VM-based sandboxing rests on two boundaries: the hypervisor, which is usually strong but exposes a large attack surface, and the VM's own permissions, which must be restricted through network limits, minimal service access and short-lived credentials so a compromised job can't do harm without escaping."
url: "https://swe.quest/articles/server-side-sandboxing-virtual-machines-66f9fa065fa102cd"
canonical: "https://www.figma.com/blog/server-side-sandboxing-virtual-machines/"
source: "Figma"
published: "2023-10-24"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["sandboxing","virtualization","serverless","appsec","cloud"]
---

# Server-side sandboxing: Virtual machines

A post on [Figma](https://swe.quest/sources/figma.md), published 2023-10-24, 10 min read, Case study. Original: [https://www.figma.com/blog/server-side-sandboxing-virtual-machines/](https://www.figma.com/blog/server-side-sandboxing-virtual-machines/)

## Summary

VM-based sandboxing rests on two boundaries: the hypervisor, which is usually strong but exposes a large attack surface, and the VM's own permissions, which must be restricted through network limits, minimal service access and short-lived credentials so a compromised job can't do harm without escaping. VMs run unmodified workloads, including third-party software, but cost more in cold starts, orchestration complexity and money than containers or seccomp. Figma runs image fetching and link-preview processing (including ImageMagick) in AWS Lambda on Firecracker, outside its production VPC and with no special privileges. The gotchas they hit were the Lambda localhost runtime API, which an SSRF could abuse, accidental IAM or VPC privileges, initial 10-second latencies, and the account-wide Lambda concurrency quota.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Virtualization](https://swe.quest/tags/virtualization.md) (Infrastructure)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- virtual machines and hypervisors
- AWS Lambda basics ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- SSRF

## Keywords

Firecracker, AWS Lambda, ImageMagick, Figma, seccomp, nsjail

## Related posts

- [Server-side sandboxing: An introduction](https://swe.quest/articles/server-side-sandboxing-an-introduction-7a8a0dd3442f4e4f.md): Figma · 2023-10-24 · Easy · 9 min read · Sandboxing & isolation, Security, Virtualization, Containers, Linux
  Server-side workloads like image processing, parsing and thumbnailing often depend on memory-unsafe C++ libraries with histories of exploitable bugs (e.g. ImageTragick), so Figma isolates them with sandboxing rather than relying solely on preventing vulnerabilities.
- [Why MicroVMs: The Architecture Behind Docker Sandboxes](https://swe.quest/articles/why-microvms-the-architecture-behind-docker-sandboxes-cc9095ea938dafa9.md): Docker · 2026-04-16 · Easy · 5 min read · Sandboxing & isolation, Virtualization, AI agents, Containers
  Docker Sandboxes run each AI coding agent session in a dedicated microVM with its own kernel and a private Docker daemon, giving VM-grade isolation while still allowing docker build, run and compose without socket mounting or host privileges.
- [What is an AI code sandbox?](https://swe.quest/articles/what-is-an-ai-code-sandbox-ff77320ddef8f884.md): Modal · 2025-07-24 · Easy · 9 min read · Sandboxing & isolation, AI agents, AI for coding, Containers
  AI code sandboxes are ephemeral, isolated environments for executing LLM-generated code so hallucinated packages, crashes or prompt-injected exploits can't affect the host or other tenants.
- [Server-side sandboxing: Containers and seccomp](https://swe.quest/articles/server-side-sandboxing-containers-and-seccomp-0f7ac1ac690426f8.md): Figma · 2023-10-24 · Medium · 15 min read · Sandboxing & isolation, Containers, Linux, Security
  Containers and seccomp offer lighter-weight sandboxing than VMs, but both shift much more configuration responsibility onto the user.
- [How Figma manages sandboxes at scale](https://swe.quest/articles/how-figma-manages-sandboxes-at-scale-2d97e81a21201803.md): Figma · 2026-11-04 · Medium · 11 min read · Sandboxing & isolation, System design, Resilience, Cloud platforms, AI agents
  Nimbus is Figma's internal platform for running tens of thousands of sandboxes for AI-generated code across multiple cloud providers.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
