If you run Moodle on your own server, the PHP security updates released on 21 October 2026 should be treated as urgent rather than as part of your next routine maintenance window.

Two critical vulnerabilities in PHP — CVE-2026-109618 and CVE-2026-109619 — can allow unauthenticated remote code execution. In practical terms, an attacker may be able to execute malicious code on an affected server without first logging in to Moodle or another application running on it.

The issue is not a vulnerability in Moodle itself. It is in PHP, the underlying language Moodle runs on, which means it potentially affects Moodle as well as many other PHP-based web applications.

What happened?

On 21 October 2026, the PHP project published a critical security advisory and released patched versions of PHP.

The affected issue applies broadly to PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers Apache with mod_php the highest-risk configuration, but PHP-FPM and other common server configurations are also within the scope of the advisory.

The two vulnerabilities are:

  • CVE-2026-109618 – remote code execution related to out-of-memory handling and corrupted request state.
  • CVE-2026-109619 – remote code execution related to internal state surviving after its underlying memory has been freed.

PHP released the following fixed versions:

PHP branch Patched version
PHP 8.5 8.5.12
PHP 8.4 8.4.27
PHP 8.3 8.3.36
PHP 8.2 8.2.35

The PHP project is particularly clear on this point: temporary mitigations can reduce exposure to some attack paths, but updating is the complete solution for the two vulnerabilities disclosed on 21 October.

PHP 8.1 and earlier releases are no longer receiving normal security releases from the PHP project. Some Linux distributions and long-term-support vendors may provide backported fixes, so administrators running older PHP versions need to check directly with their operating system or hosting vendor.

Why this matters for Moodle sites

The worrying part of PHP2SHELL is the word unauthenticated.

An attacker does not necessarily need a Moodle account to reach the vulnerable PHP code. Depending on the server configuration and attack path, a malicious web request may be enough to trigger the vulnerability.

Successful remote code execution could potentially lead to compromise of the server, including access to application files, credentials or other data available to the PHP process.

This is why simply updating Moodle itself does not address this particular issue. The PHP installation on the server needs to be patched.

Moodle HQ also issued an urgent notice to its community after the PHP2SHELL disclosure. Moodle temporarily took public-facing services offline as a precaution while patches were applied and validated, and explicitly warned that unpatched self-hosted sites remain vulnerable.

Who needs to take action?

Self-hosted Moodle sites

If your organisation operates its own Moodle server, the team responsible for that server should confirm that PHP has been updated to a patched version.

This also applies if your Moodle site is hosted by a third-party provider but you are responsible for maintaining PHP and the server environment.

Do not assume that running PHP-FPM instead of mod_php removes the risk. The official PHP advisory includes PHP-FPM among the PHP installations serving web requests that need to be updated.

If your Linux distribution uses backported security packages, the visible PHP version alone may not tell the whole story. Check the package and security information provided by your operating-system vendor.

Managed Moodle hosting

The situation is different when the server layer is fully managed for you.

Moodle informed customers using its Direct Hosting Services and MoodleCloud that PHP patches had been applied and verified on hosted sites, meaning customers did not need to perform the PHP update themselves.

The same principle applies to fully managed platforms such as ScholarLMS: customers do not administer the underlying PHP environment themselves. Server-level PHP maintenance and security patching are handled as part of the managed platform.

This is one of the practical differences between running Moodle yourself and using a managed LMS service. With self-hosting, maintaining the operating system, web server, PHP, database and related infrastructure remains part of your organisation’s security responsibility.

What self-hosted administrators should do now

If you manage your own Moodle infrastructure, there are a few things worth confirming immediately:

  1. Identify the PHP version and package currently serving your Moodle site.
  2. Install the security update supplied by PHP or your Linux/LTS vendor.
  3. Restart the relevant PHP workers or services after applying the update.
  4. Verify that the patched package is actually active on the web server.
  5. If you are running PHP 8.1 or older, confirm with your vendor whether the security fixes have been backported, or plan an upgrade to a supported PHP version.

PHP 8.2 users should also keep in mind that PHP 8.2 reaches end of life on 31 December 2026, so moving to a newer supported branch should already be part of the upgrade plan.

If your organisation does not control the server directly, contact your hosting provider and ask them to confirm that the PHP2SHELL patches have been applied.

A follow-up from PHP on 23 October

PHP published an additional informational advisory on 23 October 2026 concerning an unlikely session upload progress attack path. PHP currently recommends setting session.upload_progress.enabled=0 until the next regular bugfix release for complete protection against that specific scenario.

This is a follow-up issue and does not change the main advice from 21 October: install the current PHP security updates first.

The main takeaway

PHP2SHELL is not a reason to panic, but it is also not an update to postpone.

For organisations that self-host Moodle, PHP is part of the infrastructure you are responsible for maintaining. Confirm that the October 2026 security patches have been applied, particularly on internet-facing Moodle servers.

For organisations using a fully managed Moodle service, infrastructure updates such as these are normally handled by the service provider rather than by the LMS administrator. Moodle has confirmed this for its hosted services, while platforms such as ScholarLMS similarly manage the underlying server environment for their customers.

Either way, this incident is a useful reminder that securing a Moodle site involves more than keeping Moodle core and plugins current. The web server, PHP runtime, operating system and database underneath it matter just as much.


Sources

PHP Project: Security advisory — Critical remote code execution vulnerabilities, update now, 21 October 2026.
Read the official PHP security advisory

Moodle HQ: Update on Moodle’s response to the PHP2SHELL vulnerability, 22 October 2026.
Read the Moodle community update

Table of Contents

Want to Make Your Moodle Site Better?

Supercharge your Moodle site with plugins and fixes that boost engagement, usability, and admin efficiency — all designed to work natively inside Moodle.

Get updates, fixes, and best practices right in your inbox.

Subscription Form