PHP SECURITY

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.

Industry

Ride-hailing company

Service

PHP security remediation & validation

Engagement type

Ongoing client partnership

$ php -v
PHP 8.4.27 (cli)   # patched runtime
✓ CVE-2026-109618 / CVE-2026-109619 fixed
✓ Runtime behaviour verified
✓ Integrations tested
✓ No indicators of compromise found
✓ Laravel Octane / Swoole side effect contained

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.

PHASE 1 - Project Background

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.

Blue tech illustration: a laptop dashboard with charts, a security shield, cloud background, servers, and icons for PHP, Laravel, and Netlify connected to the data flow.

Technology stack

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

Infographic illustration of a central Laravel logo surrounded by hexagonal icons for PHP, AWS, Docker, Linux, React, PostgreSQL, Google Maps, Power BI, and other tech logos connected by blue nodes, representing integrations.
PHASE 2 - PROBLEM

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:

The business risk: a single crafted HTTP request could have given an attacker control of a production server. Waiting was not an option.

PHASE 3 - INVESTIGATION AND ACTION

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.

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
PHASE 3 - INVESTIGATION AND ACTION

Our approach - Planning and implementing the fix

Patching the runtime

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

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.

SECURE YOUR PHP ENVIRONMENT

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
PHASE 4 - VALIDATION AND RESULTS

Testing and validation - Confirming it actually worked

Installing a patch is not the same as proving it works. Every environment was validated with evidence:

PHASE 4 - VALIDATION AND RESULTS

Project outcomes - What changed after remediation

< 1 day

from advisory to patched production

All

identified PHP environments remediated

Zero

downtime during the patch rollout

Seconds

automatic recovery from the Swoole side effect

PHASE 5 - PRACTICAL TAKEAWAYS

Lessons for every PHP and Laravel team

Inventory every PHP runtime

List every service, PHP version, runtime (PHP-FPM, Octane/Swoole, CLI workers) and environment before assuming any of them is safe.

Patch the runtime, not just the framework

An up-to-date Laravel application is still vulnerable on an unpatched PHP runtime. Check both independently.

Know how your OS vendor ships fixes

Container base images and vendor repositories can silently keep an old PHP version. Upgrade explicitly, verify the installed package, and rebuild images without cache.

Test the fix's behaviour, not only its version

Security fixes can change runtime behaviour. Long-running servers like Swoole, RoadRunner or FrankenPHP worker mode deserve their own tests.

Decide trade-offs deliberately

When a fix has side effects, weigh them against the vulnerability, ship protection first, and contain the side effect with evidence-backed safeguards.

Check for prior compromise

Patching closes the door going forward. Review logs for what may have happened before it was closed.

Monitor continuously

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.