La plataforma de edge cloud de Fastly

Volver al blog

Síguenos y suscríbete

Sólo disponible en inglés

Por el momento, esta página solo está disponible en inglés. Lamentamos las molestias. Vuelva a visitar esta página más tarde.

Why your code is safe from Copy Fail on Fastly Compute

Terri Allegretto

Senior Manager, Product Marketing, Developer Platform

If you've been following the security news this week, you've probably seen Copy Fail (CVE-2026-31431) making the rounds. It's a serious one: a small Python script that can achieve root on most major Linux distributions.

For developers running code in shared environments like traditional serverless platforms or container architectures, this meant having to drop everything and quickly patch to prevent a compromise or system takeover. But this was not the case for developers running their code on Fastly Compute. Let me walk you through why.

So what is Copy Fail, exactly?

Copy Fail (CVE-2026-31431) is serious for environments that rely on shared Linux-kernel primitives and traditional container isolation. At its core, Copy Fail is a logic flaw in the Linux kernel's cryptographic subsystem. It targets a well-known optimization called Copy-on-Write (CoW), where the kernel shares memory pages between processes and only creates separate copies when one of them actually needs to write.

The exploit tricks the kernel into writing small amounts of data directly into the system's page cache — a cache that's shared across the entire host. By corrupting a sensitive file (say, /usr/bin/su) in memory, an attacker can effectively break out of their sandbox and gain root access to the machine.

It's a clever attack, and it highlights a fundamental tension in how traditional platforms handle isolation. Fastly Compute’s execution model inherently mitigates this vulnerability in two key ways: 

  1. Fastly Compute does not expose the shared page-cache primitive the exploit relies on. Many edge and cloud platforms run your code inside containers. These provide good isolation in most cases, but they still share a single underlying Linux kernel with everyone else on that host. And that's the crux of the issue: if the kernel itself has a bug in how it manages shared memory, the walls between tenants can start to break down. Copy Fail is exactly this kind of bug.

  2. Fastly Compute does not permit the low-level kernel socket access needed to trigger the attack as described.

How Fastly approaches this differently

Fastly doesn't just put your code in a smaller box — the box itself is built differently. Let me break down the key pieces.

WebAssembly runtime

We don't run your code as a traditional Linux process. Instead, Fastly Compute uses a high-performance WebAssembly (Wasm) runtime — specifically Wasmtime. Wasm provides a sandbox with formally defined boundaries. It doesn't rely on Linux kernel namespaces or control groups for its primary security model, which means kernel-level bugs like Copy Fail don't translate into an escape path for your application.

No shared page cache to target

Because our execution model doesn't depend on a shared host filesystem in the way containers do, the page cache primitive that Copy Fail exploits simply isn't part of your application's attack surface. Your code runs in its own dedicated memory heap, and that heap is destroyed the moment the request completes.

No socket options

In order to exploit Copy Fail, you also need to be able to create a socket with special options to talk to the Linux kernel cryptographic subsystem.  However, the Fastly Compute sandbox doesn't allow you to create arbitrary kernel sockets with arbitrary options.

To summarize, in the case of the Copy Fail exploit, the attacker needed to be able to do 2 things: 1) open a socket with very specific, low-level kernel options and; 2) have access to a shared system page cache. On Fastly Compute, we do not permit either of these. 

Give Compute a try today

Security isn't a feature you bolt on after the fact — it's the result of decisions made at the architecture level. By building on a Wasm-native execution model, Fastly Compute sidesteps entire categories of kernel vulnerabilities like Copy Fail, and it's one of many ways Fastly's entire platform is resilient by design.

If you're curious about how this works in practice, we'd encourage you to spin up a Compute project and explore the developer experience for yourself. We recently launched a new, generous free tier and self-purchase options for Fastly Compute. Check out our pricing page to learn more. 

¿Listo para empezar?

Ponte en contacto con nosotros