Skip to content
Scalpels home

Sign up now for $10 in credit on a new Laravel Cloud account.

Idea

How cheaply can we put a Laravel Cloud app into Isolated Mode?

· Ed Grosvenor

On 21 October, PHP shipped emergency fixes for two critical remote code execution vulnerabilities, CVE-2026-109618 and CVE-2026-109619. The pair is going around as PHP2Shell. Plenty of people took their sites offline ahead of the release rather than wait to find out whether anyone was pointing it at them. That was the right move. It is also not a move everyone can make at an hour's notice, and the people least able to make it are the ones running a site they maintain on the side.

So we want to know what the floor is. Given a Laravel application on Laravel Cloud, how little work does it take to put it into a mode where every URL on its custom domain answers with one static page? Nothing in the request path should run PHP, touch the database, read the cache, or enqueue a job.

Two constraints make this harder than it sounds. There must be no DNS change, in either direction, because a DNS change means waiting on a TTL nobody controls and then waiting again to undo it. And it has to be reversible by the same person who turned it on, in about as long. A few seconds of downtime going in and coming out is acceptable.

php artisan down --render is not this. It renders through PHP, which is the thing we are trying to take out of the path. On Cloud, an app can run as several replicas, which are identical copies of the application, and the file-based maintenance driver lives on one replica rather than all of them.

We also considered putting a Cloudflare Worker route in front of the domain on our own zone, but we parked it. A Cloud environment also answers on its own *.laravel.cloud vanity hostname, which skips our zone completely. Our reading of the docs is that the vanity hostname can be renamed but not switched off. An isolation mode with a published bypass is not isolation.

The shape we want to try

We want a stand-in application that answers every path, method, and query string with the same static page, running on something that is not PHP. Isolating means moving the custom domain from the PHP application's environment onto the stand-in's environment. Then we stop the PHP environment, which should take its vanity hostname, its queue workers, and its scheduler down with it. Restoring is the same three steps backwards.

A Cloud application can have several environments, each deployed from its own branch. The stand-in is one Cloud application with two environments on two runtimes, Go on the default branch and Rust on a second branch. The point of two is that the runtime under attack should never be the one holding the domain. The Rust Campfire experiment turned up the detail that makes this possible out of one repository. Cloud detects the runtime per environment, from that environment's branch, when the environment is created.

What we do not know yet

Recreating a domain on another environment might not hand back the same _acme-challenge target, the DNS record used to prove ownership of the domain when issuing its certificate. If that hash is per record rather than per zone, every move becomes a DNS edit, and the whole premise is gone.

We do not know what the move costs in wall-clock time, or what a visitor sees during it. Cert issuance is the obvious suspect. We also do not know whether Cloud holds the hostname for a while after the domain is deleted, which would put a floor under the swap that no amount of tuning gets past.

We do not know that stopping an environment really does take its vanity hostname down, or how long stopping and starting take. That one decides whether the PHP half is actually out of the path or merely out of the way.

Then there is the message on the page, which is the only thing the customer types. We do not know how it reaches the binary, or what it costs to change. An environment variable and a redeploy would mean a minute and a deployment per edit. That is survivable in an incident, but poor as a product surface.

Last, the CLI does send uses_vanity_domain to the API as a boolean, and we have not tried it. If it works, the vanity hostname is not an unavoidable bypass, and the Worker route we parked comes back as a much cheaper shape with no certificate in the path at all.

What we want out of the experiment is a measured number against each of those, taken from more than one place on the internet. We also want the error pages real requests get while the swap is in flight. If the floor turns out to be high, that is worth knowing too.

Experiments on this idea

  1. Experiment

    We measured two ways to isolate a Laravel Cloud site

    We built a stand-in app on two runtimes, moved a live domain onto it, stopped the PHP environment, and put both back, twice. Then we did the same thing with a Cloudflare Worker route instead. We did not change any DNS records in either direction. The Worker route took two seconds. The stand-in showed users Cloudflare's error page for about a minute each way.

    Read the experiment

Support the Lab

The Lab runs on our supporters

Every idea here gets tried for real: deployed, broken, fixed and written up. Right now that is one person doing the work between everything else, and supporters are what buy the time. As support grows, it will also pay freelancers to run experiments of their own, so more of these ideas get tested, sooner.

Our supporters

  • Chill Vibes

    A curated collection of fun and interesting experiments and projects built with AI to entertain and educate.

    Supporter Visit
    Visit Chill Vibes
  • Fawnfox Fables

    Create and publish your own children's books. Stories built around the people you love.

    Supporter Visit
    Visit Fawnfox Fables
  • Sputnik Intelligence

    Spain

    We transcribe the podcasts and read the newsletters, and make them searchable. Set up alerts, or hand it all to your AI agent over MCP or API.

    Supporter Visit
    Visit Sputnik Intelligence
  • Team of Me

    Free resources for indie makers and people thinking about striking out on their own.

    Supporter Visit
    Visit Team of Me
  • Wicked Viral

    Earth

    Connecting builders with promoters who can help them take their products to market. Get your product listed today!

    Supporter Visit
    Visit Wicked Viral