Transform Learning with a Powerful Enterprise LMS

Learn more
Performance & Security

Critical PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619: how to patch your LMS today

Two critical PHP vulnerabilities (CVE-2026-109618, CVE-2026-109619) allow unauthenticated remote code execution. What Moodle and WordPress LMS owners must do today, step by step.

Learn more about this topic with AI

Gemini opens with the prompt copied - paste it into the chat to start.

Illustration of a shield over a server, representing the critical PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619

On 21 October 2026 the PHP project released emergency security updates for two critical flaws, CVE-2026-109618 and CVE-2026-109619, that can let an attacker run code on a web server without logging in. Both are rated 9.2 (critical) under CVSS v4.0. If your LMS runs on PHP, which includes Moodle, Totara, WordPress with LearnDash, Tutor LMS or LifterLMS, Chamilo and ILIAS, update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 today and restart every PHP process.

The PHP security team says plainly that there is no complete workaround: updating is the only safe choice. Sites that use Apache with mod_php are at the highest risk, because the PHP team has a working exploit there that fires before any application code runs. PHP 8.1 and older will not get an official fix.

This guide explains what the two vulnerabilities are, who is affected, how to patch on the most common LMS hosting setups, what to do if you cannot patch right now, and how to check whether a server was attacked. It is written for LMS owners, IT teams and agencies who need to act today, and it sticks to what the PHP project and named security teams have published.

What happened: the php2shell vulnerabilities in brief

The PHP project published two advisories on 21 October 2026:

CVEPHP advisoryWhat goes wrongSeverity
CVE-2026-109618GHSA-w8hw-w9fx-j79w, "RCE via OOM corruption"When PHP runs out of memory it can be interrupted while internal request data is only partly set up. Request cleanup may then treat that invalid data as valid.Critical, CVSS v4.0 9.2
CVE-2026-109619GHSA-6wmf-4rv5-p3rp, "RCE via stale global state"Internal state that belongs to one request can survive after its memory has been freed. A later request handled by the same PHP worker may use it before normal initialisation resets it.Critical, CVSS v4.0 9.2

In both cases the confirmed impact is unauthenticated remote code execution with the permissions of the web server's PHP worker account. In practice that means an attacker who succeeds can read your LMS configuration (including database passwords), read or change learner records, plant a backdoor, or use the server to attack others.

The flaws are in the PHP interpreter itself, not in Moodle, WordPress or any plugin. Updating your LMS, theme or plugins does not fix them. Only updating PHP does.

Why this one is urgent

  • It was public before the patch. According to Tenable and Huntress, details circulated on 20 October, ahead of a disclosure originally planned for 22 October, and the PHP project moved the release forward to 21 October at 14:00 UTC.
  • Attacks may already be under way. Reports differ. Tenable quotes Cloudflare's CTO saying on 21 October that early attacks were emerging. Patchstack reports confirmed exploitation incidents. Huntress said that, as of 10:00 ET on 21 October, it had not yet seen exploitation across its partner base. Code claiming to exploit the bugs is circulating publicly, and Tenable warns that unverified exploit code is sometimes laced with malware.
  • No login is needed, and on mod_php the PHP team says the attack can trigger before any application code runs, so your LMS's own security settings cannot stop it.
  • The exposure is huge. Tenable cites estimates of more than 1.3 million internet-facing hosts that may be vulnerable.

Treat this like a fire alarm, not a routine update. Patch internet-facing LMS servers first.

Is my LMS affected?

The PHP project says every PHP installation that serves web requests is at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The risk is highest for mod_php. Use this table to place your platform:

PlatformRuns on PHP?What to do
Moodle, Moodle Workplace, TotaraYesUpdate PHP on every web and cron server. Moodle 5.2 and 5.3 need PHP 8.3 or later; Moodle 4.5 LTS accepts PHP 8.1 to 8.3, so a 4.5 site on PHP 8.1 should move to PHP 8.3.36.
WordPress with LearnDash, Tutor LMS, LifterLMS, MemberPress, SenseiYesUpdate PHP on the server or ask your host which patched version you are on. Plugin updates do not help.
Chamilo, ILIAS, other PHP LMSs and custom PHP portalsYesUpdate PHP as below.
Hosted SaaS LMS (you never manage a server)Depends on the vendorAsk the vendor to confirm in writing that its PHP servers are patched, if it uses PHP.
Canvas LMS (Ruby) and Open edX (Python)No, not the LMS itselfThe LMS is not affected, but check any PHP tools on the same servers, such as control panels or a WordPress marketing site.

Do not forget the less obvious PHP: a hosting control panel, a WordPress marketing site on the same server, a reporting tool, or an old staging copy of your LMS that is still online.

Fixed PHP versions

Your PHP branchUpdate toNotes
8.58.5.12Supported until 31 Dec 2029
8.48.4.27Supported until 31 Dec 2028
8.38.3.36Security fixes until 31 Dec 2027
8.28.2.35End of life on 31 Dec 2026: plan a move to 8.3 or newer
8.1 and olderNo official releaseUpgrade to a supported branch, use a vendor backport, or take the site off the internet

For PHP 8.1 and older, the PHP security team published minimal source backports for 7.4, 8.0 and 8.1 for people who build from source. Some Linux distributions and long-term-support vendors also backport fixes, so a distribution package can be safe even if its version number looks older. Check your vendor's advisory rather than the number alone.

How to patch: step by step

1. Find out which PHP version your site really uses

The command line and the web server can use different PHP versions, so check both:

  • On the server: php -v, and ls /etc/php on Ubuntu or Debian to see every installed version.
  • In Moodle: Site administration, then Server, then PHP info.
  • In WordPress: Tools, then Site Health, then Info, then Server.
  • To see whether Apache runs PHP as mod_php (highest risk): apachectl -M | grep -i php. A line such as php_module means mod_php.

2. Install the patched packages

On Ubuntu or Debian, replace 8.3 with your version:

sudo apt-get update
apt-cache policy php8.3-fpm php8.3-common
sudo apt-get install --only-upgrade 'php8.3-*'

The "Candidate" line from apt-cache policy should show the patched release, or your distribution's patched build. If it does not, the packages have not reached your repository yet: check again shortly and use the temporary measures below in the meantime.

  • Third-party PHP repositories: if PHP comes from Ondrej Sury's packages (the ondrej/php PPA or packages.sury.org), Ubuntu's automatic security updates do not upgrade it, as Laravel Forge points out. You must run the upgrade yourself.
  • Remi's repository (RHEL, Rocky, AlmaLinux): the PHP project said on 21 October that rpms.remirepo.net would not have updates that day and urged users to switch to distribution packages or build from source.
  • Shared hosting and cPanel / Plesk: ask your host which patched PHP builds are available, then select them for your site in the PHP selector.
  • Docker: rebuild your images on a patched PHP base image (check the tag shows the fixed version) and redeploy every container.
  • Windows: download the patched binaries from php.net.

3. Restart every PHP process

New packages do nothing until the running processes are replaced:

  • PHP-FPM: sudo systemctl restart php8.3-fpm (use your version).
  • Apache with mod_php: sudo systemctl restart apache2 (or httpd).
  • Long-running CLI processes, such as Moodle ad hoc task runners started with --keep-alive, queue workers and supervisors, keep the old PHP in memory until they restart.

4. Confirm the fix is live

Run php -v (and php-fpm8.3 -v for FPM) again, and check the PHP version in your LMS admin screen. Both must show the patched version.

Need help patching your LMS today? Our engineers can patch PHP on your Moodle, Totara or WordPress LMS servers, restart every worker, check for signs of compromise and confirm the fix. Request emergency PHP patching.

If you cannot patch right now

The PHP project lists measures that reduce exposure to specific attack paths, and it is clear that they do not make an installation safe. Use them only to buy hours, not weeks:

  • For CVE-2026-109618: set memory_limit=-1 in a place applications cannot override (for example php_admin_value in the FPM pool or Apache configuration) and check nothing sets a finite limit again. Set a low post_max_size (8M if you do not need uploads, 32M if you do) with upload_max_filesize below it, and enforce request size and multipart limits at the web server or proxy. Do not use RLIMIT_AS or RLIMIT_DATA, which can trigger the vulnerable failure.
  • For CVE-2026-109619: set session.upload_progress.enabled=0 in php.ini or the pool configuration and restart every worker (not via ini_set() or .user.ini). On PHP 8.5, also set fatal_error_backtraces=0. Remove invalid or deprecated per-request settings that emit warnings, and fix fatal errors and timeouts that visitors can trigger.
  • At the edge: Tenable reports that Cloudflare released WAF rules for all plans, including the free plan, but Cloudflare itself calls them a stopgap and they only protect traffic that actually passes through Cloudflare.
  • For end-of-life PHP: CERT-EU recommends isolating internet-facing applications until a fix is in place, for example behind a VPN.

Note that memory_limit=-1 has a cost of its own: a single runaway request can then use far more memory, so watch the server closely and remove the setting once you have patched.

How to check whether your server was attacked

No confirmed indicators of compromise had been published at the time of writing. Huntress suggests watching for behaviour instead:

  • PHP or web server processes (php-fpm, php-cgi, httpd, apache2) starting shells, interpreters or download tools such as curl and wget.
  • Command lines containing /dev/tcp/, fsockopen or mkfifo, or reconnaissance commands such as whoami, id and uname -a started by the web server.
  • New or recently changed PHP files in the web root and upload folders (for Moodle, also check that nothing executable appears in moodledata), new cron jobs, and new admin accounts in your LMS.

If you find signs of compromise, take the server off the network, keep the web and PHP logs, and treat every secret on it as exposed: database passwords, API keys, SSO certificates and SMTP credentials. Restoring from a clean backup onto a patched server is usually safer than trying to clean a live one. If learner personal data may have been accessed, your data protection obligations may require you to report it, so involve your data protection lead early.

After the patch: harden for the next one

  • Move off mod_php. The PHP team rates mod_php as the highest-risk setup for these bugs. PHP-FPM behind Apache (event MPM) or Nginx is the modern default and isolates PHP from the web server.
  • Keep PHP on a supported branch. PHP 8.2 loses security support on 31 December 2026. Moodle 5.2 and newer already need PHP 8.3 or later.
  • Put a WAF or CDN in front of public LMS sites, so emergency rules can be switched on within minutes.
  • Write down who patches what. A common reason a server stays unpatched is that nobody is clearly responsible for it: name an owner for every LMS server, staging copy and control panel.
  • Run a regular security review. Our LMS security checklist covers the controls auditors ask about, and our LMS security services can run the review for you.

How we can help

All-in-One LMS engineers build, patch and maintain PHP-based learning platforms, from single Moodle servers to multi-server WordPress LMS setups. For this incident we can update PHP and restart every worker, apply the temporary mitigations where an update must wait, check your servers for the warning signs above, and plan a move to PHP 8.3 or newer for Moodle and WordPress LMS sites still on old versions. If you would rather hand the job over for good, our LMS maintenance and support plans include security patching. Contact us now and tell us your LMS and hosting: we prioritise sites that are still unpatched.

Frequently asked questions

Is Moodle affected by CVE-2026-109618?

Moodle itself has no bug here, but it runs on PHP, so any Moodle site on an unpatched PHP version is exposed. Update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or your distribution's patched build) and restart PHP. Moodle 4.5 sites still on PHP 8.1 should move to PHP 8.3.

Does updating WordPress or my LMS plugin fix the PHP vulnerability?

No. The flaws are in the PHP interpreter, so only a PHP update fixes them. Keep WordPress and plugins updated anyway, but ask your host to confirm the PHP version your site runs on.

Is a firewall or WAF enough to protect my site?

No. A WAF rule can block known attack patterns for a while, and Cloudflare has released rules for all plans, but Cloudflare itself calls them a stopgap. The PHP project says updating is the only complete fix.

My server runs PHP 8.1 or older. What should I do?

The PHP project will not release a fix for these branches. Upgrade to PHP 8.3 or newer if your LMS supports it, use a backported package from your Linux vendor if one exists, or take the site off the public internet until you can upgrade.

How do I know if my site was hacked?

Look for PHP or web server processes starting shells or download tools, new PHP files in the web root or uploads, new cron jobs and unknown admin accounts. If you find any, isolate the server, keep the logs and rotate every password and key it holds.

Free 30-minute consultation

Not sure where to start? Talk to an LMS engineer.

Tell us what platform you run and what you need. You’ll get honest, practical advice - even if the answer is that you don’t need us.

Sources & references

  1. Security advisory: Critical remote code execution vulnerabilities, update now (21 Oct 2026) - The PHP Group
  2. GHSA-w8hw-w9fx-j79w: RCE via OOM corruption (CVE-2026-109618) - PHP (php-src on GitHub)
  3. GHSA-6wmf-4rv5-p3rp: RCE via stale global state (CVE-2026-109619) - PHP (php-src on GitHub)
  4. Supported versions - The PHP Group
  5. php2shell (CVE-2026-109618, CVE-2026-109619): frequently asked questions - Tenable
  6. Rapid Response: php2shell, leaked critical PHP vulnerabilities - Huntress
  7. Major security alert: PHP vulnerable to critical RCE - Patchstack
  8. PHP security advisory (CVE-2026-109618, CVE-2026-109619) - Laravel Forge
  9. Moodle 4.5 release notes (PHP requirements) - Moodle
Add as a preferred source on Google

Add All-in-One LMS as a preferred source to see more of our articles in Google’s Top Stories.

Learn more about this topic with AI

Gemini opens with the prompt copied - paste it into the chat to start.

Keep reading

LMS Maintenance & Support

Predictable monthly plans for updates, security patches, monitoring, backups and small improvements to your LMS.

LMS Performance Optimization

Diagnose and fix slow course pages, timeouts during exams and high server costs with profiling-led optimization.

LMS Security

Security audits, hardening and remediation for learning platforms that hold personal data, assessments and certificates.

Before you go - get a free LMS audit

Tell us which LMS you use and what is not working. An engineer replies within one business day.

Choose which optional cookies we may use. You can change this at any time from "Cookie preferences" in the footer. Cookie policy · Privacy policy