Laravel Apps and PHP2Shell: Patching Forge, Vapor, Octane and Docker Setups
For Laravel teams the fix is a PHP runtime update, but where that runtime lives depends on how you deploy. A checklist for Forge servers, Vapor, Octane workers, Sail and CI images after Black October.
Laravel developers will look for a framework release first. There is nothing to composer update for PHP2Shell: the two flaws fixed on 21 October 2026 are in the PHP runtime, and every Laravel app inherits whatever PHP its server runs. Background is in the Black October overview. This page is a deployment-by-deployment checklist.
Target: 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or later in the same line.
Confirm what production runs
php artisan about prints the PHP version, but it runs on the command line. In production, add a temporary route behind your admin auth that returns PHP_VERSION, or read it from your error tracker or APM, which records the runtime of real requests. Remove the route afterwards. Other methods are in the PHP version guide.
Laravel Forge and other self-managed servers
Forge provisions servers that you own. Update PHP through the server's packages (Forge's server page lets you manage installed PHP versions), then restart PHP-FPM. Make sure every server in the app is done: web, worker and scheduler boxes. Laravel Horizon and queue:work processes keep the old binary loaded, so restart them too (php artisan horizon:terminate or queue:restart, and let your supervisor bring them back).
Laravel Octane
Octane keeps the app booted in memory across requests, running on Swoole, RoadRunner or FrankenPHP. Two things follow:
- The worker processes must be restarted after the PHP update, or they keep running the vulnerable build.
php artisan octane:reloadreloads app code but not PHP itself; restart the Octane service. - The advisory lists FrankenPHP among affected setups. If you run Octane on FrankenPHP, update the FrankenPHP binary or image to one built on a fixed PHP, not only the system
phppackage.
Laravel Vapor and serverless
On Vapor the PHP runtime comes from the platform's runtime layers or your Docker runtime image. Check Vapor's notices for updated runtimes, then redeploy so your functions pick them up. A deploy is required: running functions do not swap runtimes on their own.
Docker, Sail and CI
If you build your own image from an official php base image, rebuild with a fresh pull and redeploy. Pinned tags like php:8.3.30-fpm will never get the fix; move the pin to a fixed patch release. Sail is a development tool, but rebuild it too so local and CI match production. Full steps are in the Docker guide.
Is application code involved at all?
The stale-state flaw is reached through fatal errors and timeouts in some paths, and the PHP team's temporary advice includes fixing "attacker-reachable fatal errors and execution timeouts". For a Laravel app that means:
- Look at your error tracker for fatal errors on public routes, especially in upload handling and imports.
- Validate file and request sizes early with form request rules.
- Avoid long synchronous processing in web requests; push it to queues.
These are hygiene, not a fix. Updating PHP is the fix.
Symfony, CodeIgniter, Slim and custom frameworks
The same logic applies to every PHP framework: identify each place a PHP runtime serves requests, update it, restart long-running workers, and verify the version from a real request. For Symfony Messenger workers, restart them with messenger:stop-workers.
After patching
Because attacks began before the release, review the server for changes. The compromise checklist applies; for Laravel also check storage/app/public and public/ for unexpected .php files and compare the deployed tree with your Git release.
Move your site to WeInc
Many teams run a Laravel app plus a separate marketing site on PHP. The marketing site does not have to share that maintenance. Move your site to WeInc: first month free with code BLACKOCTOBER, until November 21, 2026. New customers only. Claim the offer
More in Blog
- Magento and Adobe Commerce: Handling the PHP2Shell PHP Flaws
- Still on PHP 7.4, 8.0 or 8.1? Your Options After PHP2Shell
- PrestaShop Store Owners: Fixing Your Shop After the PHP2Shell Disclosure
- PHP2Shell Stopgap: Disabling session.upload_progress and Other Temporary Measures
- After Black October, Should You Move Your Website Off PHP? An Honest Answer
- Was My Site Hacked Before I Patched PHP2Shell? How to Check and What to Do
- PHP2Shell and WordPress: What Site Owners Need to Do
- Pillar Pages and Topic Clusters: How to Build Them
Related guides and tools
Start building
- how to make a website
- AI website builder
- free website builder
- website templates
- website builders by industry
How we research, test and update this page: our editorial policy. We.Inc is our own product.
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
- Drag & Drop Editor
- Built-in SEO Tools
- Custom Branding
- Client Dashboard
- Reseller Billing (Stripe Connect)
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App