Protecting a ride-hailing platform from PHP2Shell security risks
How Mallow Technologies assessed, patched and validated a production PHP and Laravel platform against the critical PHP2Shell remote code execution vulnerabilities (CVE-2026-109618 and CVE-2026-109619) within a day of disclosure, and detected and contained a hidden Laravel Octane / Swoole side effect before it could become a business problem.
Ride-hailing company
PHP security remediation & validation
Ongoing client partnership
At a glance: every PHP environment patched and validated within days of the advisory, security fix shipped first with zero downtime during rollout, and a vendor-level side effect detected in-house, contained with an automated safeguard, and tracked through to its permanent fix.
Project overview - How we identified and resolved a critical PHP security issue
Our client runs a business-critical web platform that their customers and operations teams rely on around the clock. Any interruption affects day-to-day operations directly, and any security breach would put sensitive business and customer data at risk. Mallow Technologies maintains and supports this platform end to end.
Technology stack
- PHP 8.x and Laravel across multiple application services.
- Laravel Octane on Swoole for the high-traffic web and API services - long-running PHP workers that keep the application in memory for high throughput and low latency.
- PHP-FPM with Nginx for supporting services, spanning both current and earlier PHP release lines.
- Docker containers on a Linux base image, with PHP delivered through the OS vendor's security-maintained packages, and separate development, staging, testing and production environments.
- Supporting services including relational databases, Redis, message queues, cloud object storage, APM and centralised logging.
When the PHP project announced two critical vulnerabilities, every one of these PHP runtimes was potentially exposed. Our objective was simple – close the vulnerability across every environment as quickly as possible, without disrupting the business, and prove the outcome with evidence.
Tech Stack
- Ruby on Rails
- AngularJS
- PostgreSQL
- JavaScript
- AWS
- BlueRover
- Munic
- Google Maps
- FMCSA
The challenge - Why PHP2Shell required immediate attention
In October 2026, the PHP project disclosed two critical vulnerabilities, widely referred to as PHP2Shell, both rated 9.2 (critical) under CVSS v4.0:
| Vulnerability | What goes wrong | Why it matters |
|---|---|---|
|
CVE-2026-109618 RCE via out-of-memory corruption |
If PHP ran out of memory while preparing a request, it could leave internal data half-written and later act on it during cleanup. | An attacker could craft a request that turns this into running their own code on the server. |
|
CVE-2026-109619 RCE via stale global state |
PHP could keep internal references to memory from a finished request, which a later request could then misuse. | A follow-up request could hijack that stale state to execute attacker-controlled code. |
What made PHP2Shell especially serious:
- No login required. Both flaws sit in PHP's core request handling, which runs before the Laravel application code. Authentication, middleware and input validation could not stop them.
- No application bug required. A well-written Laravel application on a vulnerable PHP runtime was still exposed.
- Full server compromise. Successful exploitation means remote code execution: access to environment secrets, databases, cloud credentials and internal systems.
- Public disclosure. Once a critical PHP vulnerability is public, the window before automated scanning and exploitation begins is short.
The business risk: a single crafted HTTP request could have given an attacker control of a production server. Waiting was not an option.
Our assessment - Understanding the extent of exposure
Rather than assuming every service was affected in the same way, we mapped the real exposure of each runtime and chose the right fix for each.
- Full PHP inventory. Every service, PHP version, runtime (Octane/Swoole or PHP-FPM) and environment was listed, from development to production.
- Vendor patch tracking. We tracked the official PHP releases (8.2.35, 8.3.36, 8.4.27, 8.5.12) and the Linux vendor's security advisories hour by hour, adopting each patched package as soon as it was published.
- Earlier PHP release lines. Some PHP versions in the wider landscape no longer receive official releases. Rather than leave them exposed or force a rushed upgrade, we identified the PHP security team's official source backports as the right path, and applied interim hardening while the patched builds were prepared.
- Behaviour-change analysis. We read the fix itself, not just the version number. The patch changes how PHP handles out-of-memory errors, so we tested how that change would interact with long-running Swoole workers before relying on it in production.
| Runtime | Exposure | Remediation path |
|---|---|---|
| Laravel Octane on Swoole (current PHP release lines) | Critical | Patched vendor PHP packages, image rebuild |
| PHP-FPM (earlier PHP release lines) | Critical, no official patch release | Interim hardening, then official PHP security backport build |
| All environments | Same runtime risk in each | Dev, staging, testing and production all in scope |
Our approach - Planning and implementing the fix
Patching the runtime
- Reproducible image builds. Container images were updated to pull the patched PHP packages explicitly (the Linux vendor's repository versioning meant a routine update alone could silently keep the vulnerable version), then rebuilt from scratch so no stale layers survived.
- Extensions rebuilt and verified. Swoole and other compiled PHP extensions were rebuilt against the patched PHP and checked on startup.
- Earlier PHP release lines patched too. Services on PHP versions without an official patch release were rebuilt from the official PHP security backport, with configuration paths, extensions and settings verified after the move to a source build.
- Zero-downtime rollout. Changes were rolled out through the normal deployment pipeline, environment by environment, with production prioritised.
Detecting the hidden side effect, before it found us
Our behaviour-change testing uncovered something the release notes did not mention. With the patched PHP, when a single request in a Laravel Octane / Swoole worker exceeded PHP’s memory limit, the worker no longer restarted. It stayed alive in a broken state and answered every following request with an HTTP 503, until it was eventually recycled. Error trackers also stopped receiving these out-of-memory errors.
We traced the cause to an interaction between the new PHP fix and Swoole’s long-running worker model, confirmed it with controlled tests, and matched it to the same behaviour reported upstream to the Swoole project (issue #6322).
The decision: delaying the security patch would have left every server exposed to a critical, publicly known remote code execution flaw. We shipped the security fix first, and engineered a safeguard for the side effect in parallel, a deliberate trade-off between a critical risk and a manageable one.
Containing it with an automated safeguard
- Faster worker recycling. Octane's request limit was tuned so any affected worker is replaced far sooner.
- OOM watchdog. A lightweight supervisor-managed watchdog watches PHP's error log and gracefully reloads the Octane workers the instant an out-of-memory error appears, so recovery happens within about a second instead of after hundreds of failed requests.
- No collateral damage. Swoole's max_wait_time was aligned with Octane's request timeout, so healthy requests already in progress finish normally during the reload. We validated this with timed reload tests under load.
- Options tested and rejected with evidence: PHP's new memory_hard_limit_percent setting, alternative Swoole dispatch modes, and health-check polling were each evaluated and ruled out because they either did not prevent the issue or added risk.
Swoole has since merged a fix for this behaviour, scheduled for Swoole 6.3.0. Our safeguard keeps the platform stable until that release is available, tested and deployed.
Is your PHP environment secure?
Not sure where your PHP environment stands? Mallow Technologies helps teams assess, remediate and validate PHP and Laravel vulnerabilities, including complex runtimes like Laravel Octane and Swoole, without guesswork or unplanned downtime.
validation_log.txt [OK] patched PHP packages installed on all images [OK] compiled extensions (Swoole etc.) loaded [OK] patched OOM behaviour observed in controlled test [OK] critical user journeys and integrations passed [OK] OOM watchdog reload: affected worker replaced in ~1s [OK] in-flight requests completed during reload [OK] no indicators of compromise in reviewed logs [OK] all environments on the patched runtime
Testing and validation - Confirming it actually worked
Installing a patch is not the same as proving it works. Every environment was validated with evidence:
- Patched runtime confirmed on every image: package versions, PHP version and build date checked directly inside running containers.
- Fix confirmed active by observing the patched out-of-memory behaviour in controlled tests, proving the new code path was really running.
- Application and integrations tested: authentication, databases, Redis, queues and message brokers, cloud storage, APM and logging.
- Side-effect safeguard verified in testing and in production: affected workers recover automatically within seconds, and in-flight requests complete.
- Compromise review: logs from before the patch were reviewed for indicators of exploitation.
- Coverage confirmed: every running instance verified on the new image, with no old versions left behind.
Project outcomes - What changed after remediation
from advisory to patched production
identified PHP environments remediated
downtime during the patch rollout
automatic recovery from the Swoole side effect
- Critical exposure closed across every environment and every PHP release line in use, including versions without an official patch release.
- Business continuity protected: the security fix shipped without planned downtime, and the vendor side effect was contained before it could affect users at scale.
- Visibility restored and improved: PHP error logs are now centralised, with alerts for out-of-memory errors and abnormal 503 rates.
- A clear path to the permanent fix: the Swoole 6.3.0 upgrade is tracked, after which the temporary safeguard can be retired.
- Knowledge shared: a common testing guide and an observations report were prepared for every PHP project team, so the same lessons apply across the portfolio.
Lessons for every PHP and Laravel team
List every service, PHP version, runtime (PHP-FPM, Octane/Swoole, CLI workers) and environment before assuming any of them is safe.
An up-to-date Laravel application is still vulnerable on an unpatched PHP runtime. Check both independently.
Container base images and vendor repositories can silently keep an old PHP version. Upgrade explicitly, verify the installed package, and rebuild images without cache.
Security fixes can change runtime behaviour. Long-running servers like Swoole, RoadRunner or FrankenPHP worker mode deserve their own tests.
When a fix has side effects, weigh them against the vulnerability, ship protection first, and contain the side effect with evidence-backed safeguards.
Patching closes the door going forward. Review logs for what may have happened before it was closed.
Centralised PHP error logs and alerts turn the next incident into a notification, not a surprise.
What happens after you fill-up the form?
Request a consultation
By completely filling out the form, you'll be able to book a meeting at a time that suits you. After booking the meeting, you'll receive two emails - a booking confirmation email and an email from the member of our team you'll be meeting that will help you prepare for the call.
Speak with our experts
During the consultation, we will listen to your questions and challenges, and provide personalised guidance and actionable recommendations to address your specific needs.