Self-hosted Matomo and PHP2Shell: what to patch, and what your logs miscount

Matomo On-Premise is a PHP application, so the two PHP flaws fixed on 21 October 2026 (CVE-2026-109618 and CVE-2026-109619, called PHP2Shell) concern every self-hosted install. The fix is in PHP, not in Matomo: install PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 and restart PHP. Matomo 6 still accepts PHP 8.1, which gets no fix from the PHP project. Matomo published its own advisory on 21 October: Cloud is already protected, and On-Premise users must update PHP.

Updated How we check

On this page

Which Matomo setups are affected

Both flaws are rated critical (CVSS v4.0 9.2) and can allow unauthenticated remote code execution. The PHP project says every PHP installation that serves web requests is affected; Google Cloud gives the vulnerable range as PHP 5.4 through 8.5.11.

Your setupWhat it meansWhat to do
Matomo On-Premise on PHP 8.2 to 8.5Affected until PHP is updatedInstall the fixed PHP release for your branch and restart PHP
Matomo On-Premise on PHP 8.1 or olderAffected, and the PHP project ships no fix for these branchesMove to PHP 8.3 or newer; minimal source backports exist for 7.4, 8.0 and 8.1 if you cannot move today
Matomo CloudMatomo hosts the PHPNothing: Matomo's advisory of 21 October 2026 says Cloud customers are already protected and no action is required
Only the tracking code on your siteThe JavaScript runs in visitors' browsers and sends data to PHP on the Matomo serverPatch the server that runs Matomo, wherever it is

Why PHP 8.1 matters here: Matomo's requirements page lists "PHP version 8.1 or newer" for Matomo 6.0.0, and "PHP 8" for Matomo 4.16 and 5. An install can therefore meet Matomo's requirements and still run a PHP branch without an official fix. PHP 8.2 itself reaches end of life on 31 December 2026.

Patch in five steps

  1. Open Administration › Diagnostic › System Check in Matomo. It reports the PHP version the web server uses for Matomo.
  2. Install the fixed release (8.5.12, 8.4.27, 8.3.36 or 8.2.35) from your PHP source, or your Linux distribution's patched package. The PHP project says vendors received the fixes in advance; a distribution may ship the fix under its own version number.
  3. Update the PHP command-line binary too. Matomo's install guide notes that the web interface runs under PHP-FPM while archiving (core:archive) runs under PHP-CLI, and the two can differ.
  4. Restart PHP-FPM or the web server so no worker keeps running the old code, then open the System Check again and confirm the version. If your distribution backports fixes, check its changelog for CVE-2026-109618 and CVE-2026-109619 instead of the version number.
  5. If you cannot update today, the PHP project lists interim settings such as session.upload_progress.enabled=0. It says they are not a substitute for updating.

The flaws are in PHP, so the fix is a PHP update. Matomo's advisory of 21 October 2026 says the same: updating Matomo does not fix it, the fixes belong in the underlying PHP installation, and for older branches you should ask your operating system or hosting provider about patches or move to a supported version. Matomo 5.14.2 (22 October 2026) adds a warning for On-Premise installs that run an affected PHP version. The check looks at the version number, so an open Matomo issue (#25572, 22 October) reports a false alarm on Ubuntu 24.04 with a distribution-patched PHP 8.3.6 package. If you run a distribution package, confirm the fix in its changelog, as in step 4.

What a server log counts that a tracker does not

Server logs and JavaScript trackers count different things. We compared both on this site for the same 48 hours (19 October 2026 16:07 UTC to 21 October 2026 16:00 UTC). This site runs no PHP and no WordPress.

MeasureValue
Requests in the server log14,134 from 811 IP addresses
Scanner-style probes (WordPress files, .env, .git and similar)6,481 (45.9 percent) from 159 IP addresses
Of those, with a browser-like user agent5,275
HTML pages served with status 2001,575
Of those, with a browser-like user agent977
Page views counted by the JavaScript tracker53
  • Matomo's log importer, per its FAQ, does not count HTTP errors (4xx) unless you add --enable-http-errors, so the 3,669 probes that ended in a 404 stay out by default. 2,809 probes got a redirect (308); we found no statement on how the importer treats redirects without --enable-http-redirects.
  • It detects bots "by looking at the User-agent field", in Matomo's words. A client that sends a browser user agent and receives a real page passes that test. In our log, 977 page responses had such a user agent, against 53 page views in the JavaScript tracker. We cannot say how many of the 977 were people, so treat the gap as a reason to compare, not as a bot count.
  • The tracker count is lower than the real number of human visits: the tracker on this site sends nothing for visitors with Do Not Track, Global Privacy Control or the opt-out, ignores headless browsers, and misses visitors who block JavaScript. Our own test visits are included in both counts.

If you import logs into Matomo, compare the imported numbers with your tracker for the same days before you trust them, and exclude address ranges you know are not people. Logs cannot recover a missing referrer either; see why AI clicks end up as Direct. How the AI channel works in Matomo is in the Matomo setup guide.

How we measured

  • Server numbers come from the JSON access log of the web server in front of this site, deduplicated, for the window above.
  • A probe is a request whose path or query string matches a fixed list of patterns for WordPress and PHP files, secrets and config files, and debug endpoints. 3,669 of them got a 404, 2,809 a 308 redirect and 3 a 200 (the home page with a probe-like query string).
  • Browser-like means the user agent contains Mozilla/ and names no known crawler, tool or HTTP library.
  • HTML pages are GET requests over HTTPS with status 200 and an HTML content type, excluding scripts, styles, images and API routes.
  • The tracker is a cookieless JavaScript tracker (self-hosted Umami) on the same pages.

Follow-up questions

Do I need a Matomo update for PHP2Shell?

The flaws are in PHP, so the fix is a PHP update, and Matomo's advisory says updating Matomo does not fix them. Matomo 5.14.2 adds a warning for affected PHP versions. Update PHP, restart it, and check the version in Matomo's System Check.

Is the Matomo tracking code on my website a risk?

The snippet itself runs in the visitor's browser and is not the weak point. It sends data to PHP on your Matomo server, and that server is what needs the update.

Does Matomo Cloud need action from me?

No. Matomo's advisory of 21 October 2026 says Cloud customers are already protected and no action is required.

Why does Matomo warn me on a patched Linux server?

The warning in Matomo 5.14.2 is based on the upstream PHP version number, so a distribution package with a backported fix can still trigger it; an open Matomo issue reports this for Ubuntu 24.04. Check your distribution's changelog for CVE-2026-109618 and CVE-2026-109619.

Sources

Read on . Links lead to the original pages.