PHP2Shell is the working name given to two reportedly critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, which security researchers say can be triggered through crafted HTTP requests and lead to unauthenticated remote code execution. The available evidence is future-dated, so version numbers and severity claims must be revalidated against the official PHP advisory and your Linux distribution’s bulletin before you act on them or publish them internally.

What is not in doubt is the operational reality for most Moroccan SMEs: PHP still powers a large share of the websites, e-commerce stores, customer portals and internal tools that keep revenue moving, and many of those runtimes are old, undocumented and directly reachable from the internet. This playbook sets out a four-phase response sequence — patch or contain, restart, verify, hunt — that an IT team of two or three people can execute in a single maintenance window.

Key Takeaways

  • PHP2Shell refers to CVE-2026-109618 and CVE-2026-109619, reportedly rated CVSS v4.0 9.2 and affecting PHP 5.4 and later, with the highest exposure on internet-facing PHP-FPM, mod_php, CGI, FrankenPHP and LiteSpeed deployments.
  • Reported fixed releases cover supported branches only: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older have no identified official release and require isolation, vendor backports or migration.
  • Patching is not the end of the incident. A simple POST request may be enough to trigger the flaws, so assume exploitation is possible until logs and file integrity checks say otherwise.
  • Verify the PHP version used by production traffic, not the version in your repository or on your laptop.
  • Because the source material is future-dated, confirm every version number against the current PHP security advisory and your distribution’s own bulletin before operationalising it.

What PHP2Shell Reportedly Changes for Moroccan SMEs

According to the available reporting, the two flaws affect PHP versions from 5.4 onward, with the greatest operational exposure on internet-facing PHP-FPM, mod_php, CGI, FrankenPHP and LiteSpeed deployments. Both were assigned a CVSS v4.0 score of 9.2, although earlier leaked material reportedly claimed a maximum score of 10. Cloudflare has published a technical overview and WAF protection guidance, and Check Point has documented the disclosure timeline and severity assessment.

The reported fixed releases are:

PHP branchReported fixed versionOperational implication
PHP 8.58.5.12Upgrade immediately
PHP 8.48.4.27Upgrade immediately
PHP 8.38.3.36Upgrade immediately
PHP 8.28.2.35Upgrade immediately
PHP 8.1 and olderNo official release identifiedIsolate, use vendor backports, or migrate

PHP’s own support policy grants full support to a release branch for two years after its stable release, followed by a security-fixes period. An unsupported branch is not safe simply because the application still runs; reported fixed versions apply to supported branches only. For PHP 8.1 and older, the realistic options are an operating-system or commercial vendor backport, a source rebuild, or migration to a supported branch. Ubuntu has published its own vulnerability overview and fix availability, which is the correct place to confirm what your servers can actually install.

Phase 1: Patch or Contain Immediately

  1. Build an inventory. List every web server, virtual host, container, load balancer, control-panel account, cron job and third-party SaaS integration that runs PHP. Confirm the actual runtime with php -v, PHP-FPM service definitions, container image manifests and web-server configuration. A composer.json file does not prove which PHP binary serves production traffic.
  2. Prioritise public services. Patch internet-facing systems first, especially PHP-FPM and mod_php. Include staging environments that are publicly reachable, forgotten subdomains, management portals, WordPress installations, e-commerce platforms and APIs. Attackers scan for reachability, not for organisational charts.
  3. Use trusted packages. Apply updates from the operating-system repository, official PHP packages or a known vendor. Confirm that the package update changes the running binary rather than only refreshing a development installation that no customer ever touches.
  4. If patching cannot happen today, isolate. Remove vulnerable hosts from the internet, restrict access through a VPN or allowlist, place them behind a reverse proxy or web application firewall, and disable unnecessary PHP endpoints. These measures reduce exposure but do not replace upgrading.
  5. Treat old PHP as an emergency migration issue. PHP 5.x, 7.x, 8.0 and 8.1 environments are particularly risky where no supported vendor patch exists. Reported guidance includes disabling session.upload_progress.enabled for some legacy installations or applying a source-level fix, but configuration workarounds should be validated in a test environment and confirmed against the official advisory before being trusted.

Moroccan SMEs running cash-on-delivery storefronts should treat checkout and order-management endpoints as tier-one assets during this phase, since downtime or tampering there translates directly into lost revenue and customer disputes.

Phase 2: Restart PHP and the Web Server Safely

After package installation, restart the component that actually loads PHP. Use the correct service name for the installed branch:

sudo systemctl restart php8.3-fpm
sudo systemctl reload nginx

Apache deployments may require an Apache reload or restart. Containerised applications require replacing the container or redeploying the image, not editing files inside a running instance. Record the maintenance window, package versions, the operator’s name and any failed restart — that record becomes evidence if the incident is later reviewed.

Before returning the service to normal traffic:

  • Check PHP-FPM, web-server and application logs for new errors.
  • Test login, checkout, file uploads, API calls, queues and scheduled jobs.
  • Confirm database connectivity and cache behaviour.
  • Monitor CPU, memory, process counts, HTTP 5xx errors and latency.
  • Keep a rollback plan, but never roll back to a vulnerable build unless the service is first isolated from the internet.

Phase 3: Verify the Fix From the Runtime

Run verification from the server and from the deployment system, not from a developer workstation:

php -v
php --ini
php -i | grep -E 'session.upload_progress.enabled|Server API'

For PHP-FPM, verify the version exposed by the web process rather than relying only on the command-line binary. A temporary diagnostic endpoint can disclose the runtime version, but remove it immediately after testing, because publicly exposing PHP configuration creates unnecessary risk of its own.

Confirm that:

  • The version matches the fixed release for the branch.
  • The web server is connected to the updated PHP-FPM socket or process.
  • Old PHP processes have exited.
  • Container images and autoscaling nodes use the patched digest.
  • Vulnerability scanners no longer identify the affected component.
  • Package-management records show a successful update.

The reported fixed releases are 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Because the search evidence is future-dated, verify these numbers against the current PHP security advisory and your distribution’s bulletin before publishing or operationalising them.

Phase 4: Hunt for Intrusion After Patching

Patching does not establish that a system was never exploited. Reported public information says the flaws may be triggered by a simple POST request and could result in unauthenticated remote code execution or shell access. Preserve evidence before deleting suspicious files.

  • Export reverse-proxy, firewall, web-server, PHP-FPM, authentication and cloud audit logs.
  • Search for unusual POST requests, abnormal content lengths, encoded parameters, unexpected status codes and bursts against upload or session-related endpoints.
  • Review PHP upload directories, temporary directories, web roots, /tmp, scheduled tasks, startup scripts, SSH keys and recently modified files.
  • Look for web shells, unfamiliar PHP files, altered .htaccess rules, new administrators, unknown API tokens, outbound connections and child processes launched by PHP.
  • Compare file hashes with a clean deployment artefact or version-control repository.
  • Review database changes, payment settings, customer records and access logs for the period beginning before the patch.
  • Rotate application secrets, database passwords, administrator credentials, API keys and cloud tokens if compromise is plausible.
  • Rebuild compromised servers from trusted images instead of relying only on cleanup.

If evidence suggests unauthorised access, disconnect or isolate the host while preserving volatile and disk evidence, notify management, and consult a qualified incident-response provider. Moroccan businesses should also assess contractual, sector-specific and personal-data notification obligations with legal counsel and the relevant authorities. The wider national picture — from phishing to ransomware against local organisations — is covered in Onyx’s analysis of Morocco’s cybersecurity crisis and what it means for professionals, which is useful context when briefing non-technical leadership.

SME Checklist and What to Watch Next

  • Inventory every PHP runtime and its exposure.
  • Patch supported branches with trusted packages.
  • Isolate legacy systems that cannot be patched.
  • Restart PHP and the web server, and record the window.
  • Verify the version used by production traffic.
  • Test business-critical functions end to end.
  • Preserve logs and hunt for exploitation.
  • Rotate secrets and rebuild systems when compromise is suspected.
  • Document decisions, timestamps, evidence and customer impact.

Two things deserve attention in the coming weeks. First, confirm the advisory status directly with the PHP project, your Linux distribution and any control-panel vendor you depend on, because the evidence base here is future-dated and version numbers may shift. Second, use the incident as a forcing function for the migration you have been postponing: an unsupported PHP branch is a standing liability, not a saving.

Teams that also handle digital payments should review their integration credentials and callback endpoints alongside the PHP upgrade, since payment flows are a common target after any web-tier compromise; Onyx’s review of Morocco’s digital payments shift outlines where those integrations are heading. The sequence itself is unglamorous — patch, isolate, restart, verify, hunt — but executed in that order it converts a critical disclosure into a controlled maintenance event rather than an open-ended breach investigation.