PHP2Shell.fyi Check a site

Moodle and PHP2Shell

Moodle runs on PHP, and PHP2Shell is two flaws in PHP itself (CVE-2026-109618 and CVE-2026-109619), so a Moodle update does not fix it. Install a fixed PHP release that your Moodle version supports.

Last reviewed . Rules of .

What fixes it

See your PHP version in Moodle

  1. Log in to Moodle as an administrator.
  2. Go to Site administration › Server › PHP info.
  3. The page shows the PHP version and settings that your Moodle website uses.

The command line on the server can use a different PHP or a different php.ini. If Moodle tasks run from the command line, update that PHP too.

Before you change PHP, open Site administration › Server › Environment. It checks your site against the system requirements of the current and future Moodle versions.

Which PHP release to install

PHP ranges from the Moodle PHP policy. Fixed releases from php.net.
MoodleSupported PHPFixed PHP to install
4.5 (LTS)8.1 to 8.38.3.36 or 8.2.35
5.18.2 to 8.48.4.27, 8.3.36 or 8.2.35
5.0 (no longer supported)8.2 to 8.48.4.27, 8.3.36 or 8.2.35
5.2 and 5.3 (LTS)8.3 to 8.48.4.27 or 8.3.36

No Moodle version in this table supports PHP 8.5.

Do not move Moodle to PHP 8.5 to get the fix. Use the newest fixed release on a branch that your Moodle version supports.

Moodle 5.0 gets no more fixes from Moodle. Update PHP first, and plan the Moodle upgrade as a separate task. Moodle 4.5 (LTS) gets security fixes until 4 October 2027, and 5.3 (LTS) until 1 October 2029 (moodledev.io).

PHP 8.2 gets security fixes only until 31 December 2026. If your Moodle version supports 8.3 or 8.4, prefer one of those.

Still on PHP 8.1?

Moodle 4.5 also runs on PHP 8.1, but the PHP project has no 8.1 release with the fix. The PHP security team published source backports for 7.4, 8.0 and 8.1 only. Some Linux distributions and hosts ship 8.1 builds that include the fix and keep the old version number. Ask your OS vendor or host, or move Moodle 4.5 to PHP 8.3.36 or 8.2.35. See Fixed versions.

How to update PHP

After the update

Technical notes

Sources

Check your site

Our checker reads the public response of your Moodle site and reports any PHP version it can see. Check my site.