Cloudflare Containers Leaked Neighbors' Disk Data
On September 24, 2026 Cloudflare published the details of a cross-tenant data exposure in Cloudflare Containers and Sandboxes: a single Workers Paid account could read residual data left behind by earlier workloads that had shared the same host. The report arrived through HackerOne on September 4 from a researcher at Accomplish, the fix rolled across the fleet within three days, and cleanup of pre-mitigation cached snapshots finished on September 19.
The story is bigger than one vendor. It hits an assumption most engineers never examine: that a container's scratch disk starts empty.
The problem: scratch disk is not a blank page
Start a fresh container and it is natural to assume the space it gets is clean. In practice that space is not a dedicated physical disk. It is a logical slice carved out of a shared pool serving many customers on the same machine. Delete the container and its blocks return to that pool to be handed to someone else.
Which makes one question decisive: are those blocks zeroed before they are handed over?
What actually happened
Cloudflare ran Linux device mapper thin provisioning with a 64 KiB block size and skip_block_zeroing enabled. The performance logic is understandable — zeroing on every allocation is expensive. The security consequence shows up at a size mismatch.
The pool allocates in 64 KiB units, while ext4 writes in 4 KiB units. So writing 4 KiB into an unmapped region forces the pool to allocate a full 64 KiB block. The write covers only its own slice, leaving up to 60 KiB exactly as a previous tenant left it. A raw read of the device afterwards surfaces that content.
The verification numbers from Cloudflare's report: residual data appeared on 18 of 24 test placements, and 2,700 distinct foreign inodes were counted. Targeting was not possible — placement across hosts is effectively random — and Cloudflare found no evidence of real-world exploitation.
The fix: remove skip_block_zeroing from the pool configuration, retire every container disk created before the change, and clear each host's image cache.
What is left on your side
The vulnerability itself is closed at the provider. What remains in your control is lowering the value of whatever you leave on disk. The cheapest version of that: an encryption key that lives only in memory and dies with the process.
// scratch.js — anything that touches disk gets written encrypted
import { createCipheriv, createDecipheriv, randomBytes } from 'node:crypto';
import { writeFile, readFile } from 'node:fs/promises';
// One key per instance, in memory only — never written, never exported
const KEY = randomBytes(32);
export async function putScratch(path, plaintext) {
const iv = randomBytes(12);
const cipher = createCipheriv('aes-256-gcm', KEY, iv);
const body = Buffer.concat([cipher.update(plaintext), cipher.final()]);
await writeFile(path, Buffer.concat([iv, cipher.getAuthTag(), body]));
}
export async function getScratch(path) {
const blob = await readFile(path);
const decipher = createDecipheriv('aes-256-gcm', KEY, blob.subarray(0, 12));
decipher.setAuthTag(blob.subarray(12, 28));
return Buffer.concat([decipher.update(blob.subarray(28)), decipher.final()]);
}Whatever block stays behind in the pool after the container ends is ciphertext under a key that no longer exists. For small files there is a simpler option: a tmpfs mount, so the data never reaches disk at all.
Real-world caveats
- Encryption here is defense in depth, not a substitute for provider isolation. It does not protect what the platform writes on your behalf: image layers, managed database files, log files.
- tmpfs comes out of the same memory budget, so its size is a capacity decision, not a detail.
- "No evidence of exploitation" is not "nothing leaked." Long-lived credentials written to a container disk before September 19 are worth rotating — good practice regardless of this incident.
- The architectural note matters more than the patch: everything you write to a scratch disk is a permanent liability. Shorten that list before you encrypt it.
Takeaway
Isolation in multi-tenant infrastructure rarely falls to a spectacular exploit. It falls to a performance trade-off that reads as reasonable on paper, meeting a mismatch in unit sizes. The practical lesson is a single line: treat scratch disk as shared media, not private space — write as little to it as you can, and encrypt what you must. If you run workloads on the same platform, our earlier piece on Python Workers reaching GA covers the neighboring ground.
Primary source: Cloudflare's write-up of the vulnerability.