Hi everyone,
Today, the PHP team disclosed two critical, high-impact security vulnerabilities (CVE-2026-109618 and CVE-2026-109619, collectively referred to as php2shell) that affect all supported versions of PHP. Both carry a CVSSv4 score of 9.2 and allow unauthenticated Remote Code Execution (RCE).
Why this matters for Flarum administrators
Because these vulnerabilities exist in the core PHP engine itself—specifically during request initialization, multipart/file upload parsing, and out-of-memory cleanup—they can be triggered before Flarum's application code even runs. Even a fully up-to-date Flarum installation is vulnerable if the underlying PHP runtime is unpatched. Both PHP-FPM (commonly used with Nginx/Caddy) and Apache mod_php setups are affected.
What is the issue?
- CVE-2026-109618 (OOM Memory Corruption): When a specially crafted request (such as a multipart form upload) triggers PHP's memory_limit while internal structures are only partially initialized, the cleanup routine can corrupt heap memory and lead to arbitrary code execution.
- CVE-2026-109619 (Stale Global State Use-After-Free): When a fatal error interrupts request cleanup, a dangling pointer can persist in global state across requests on persistent worker processes (like PHP-FPM workers), allowing a follow-up request to achieve RCE.
Action Required: Upgrade Immediately
Please update your operating system packages and PHP runtime as soon as possible, and restart your PHP-FPM or web server service afterward so the new binaries take effect.
The vulnerabilities are patched in the following upstream versions:
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
*
(Note: If you use distro-managed packages on Debian, Ubuntu, RHEL, AlmaLinux, or third-party repos like Ondřej Surý's PPA / Remi's RPM repository, security backports are already rolling out—run your system package updates and verify the changelog).
Quick Upgrade Commands:
Debian / Ubuntu:
sudo apt update && sudo apt upgrade -y
sudo systemctl restart php8.3-fpm # Replace 8.3 with your active PHP version (or restart apache2)
RHEL / AlmaLinux / Rocky / Fedora:
sudo dnf upgrade --refresh -y
sudo systemctl restart php-fpm # Or restart httpd
Docker / Containerized Flarum setups:
Pull the latest upstream PHP base images, rebuild/recreate your containers, and verify your running version with php -v.
Official Links & Advisories
- Official PHP.net Security Release Announcement
- CVE-2026-109618 GitHub Security Advisory
- CVE-2026-109619 GitHub Security Advisory
- The PHP Foundation Technical Post-Mortem
Stay safe, and don't forget to restart your PHP worker processes after updating!