{"id":728,"date":"2026-10-21T18:30:00","date_gmt":"2026-10-22T01:30:00","guid":{"rendered":"https:\/\/rainier-it.com\/blog\/?p=728"},"modified":"2026-10-21T12:45:50","modified_gmt":"2026-10-21T19:45:50","slug":"patched-php-servers-same-day","status":"publish","type":"post","link":"https:\/\/rainier-it.com\/blog\/patched-php-servers-same-day\/","title":{"rendered":"Patched PHP Servers: How We Handled PHP2Shell"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We patched PHP servers the same day the PHP2Shell fix came out on Oct. 21, 2026. Attackers were already testing the bug, so we moved fast and checked our work as we went.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our <a href=\"https:\/\/rainier-it.com\/blog\/php2shell-flaw-update-php-website\/\">earlier alert<\/a> told you what to do. This post shows what it looked like from the inside, and how we were secure, fast. You can copy the steps whether you run one website or a few.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your site sits with a hosting company, you can mostly relax. You just need to ask them a question, and we cover it below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What PHP2Shell is and who is affected<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PHP is the programming language behind a huge share of websites. <a href=\"https:\/\/sansec.io\/research\/php2shell\" target=\"_blank\" rel=\"noopener\">Sansec<\/a> says two critical bugs, CVE-2026-109618 and CVE-2026-109619, let an attacker run code on a web server without logging in. Both are rated 9.2 on the CVSS v4.0 scale, which tops out at 10.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The flaws are in PHP itself, not in your website&#8217;s code. <a href=\"https:\/\/sansec.io\/research\/php2shell\" target=\"_blank\" rel=\"noopener\">Sansec<\/a> says researchers showed attacks working against WordPress, Drupal, Joomla, Nextcloud and other well-known PHP apps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sansec also reports that Cloudflare saw early attacks at 7:43 a.m. UTC on Oct. 21, hours before the 2 p.m. UTC release. <a href=\"https:\/\/watchtowr.com\/intelligence\/php-remote-code-execution-php2shell\/\" target=\"_blank\" rel=\"noopener\">watchTowr<\/a> says details leaked online on Oct. 20 and that it sees exploitation in the wild.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Product<\/th><th>Affected<\/th><th>Fixed<\/th><\/tr><\/thead><tbody><tr><td>PHP 8.5<\/td><td>Before 8.5.12<\/td><td>8.5.12<\/td><\/tr><tr><td>PHP 8.4<\/td><td>Before 8.4.27<\/td><td>8.4.27<\/td><\/tr><tr><td>PHP 8.3<\/td><td>Before 8.3.36<\/td><td>8.3.36<\/td><\/tr><tr><td>PHP 8.2<\/td><td>Before 8.2.35<\/td><td>8.2.35<\/td><\/tr><tr><td>PHP 8.1 and older<\/td><td>Affected<\/td><td>No fix from the PHP project; ask your vendor for a backport or upgrade<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The versions come from the <a href=\"https:\/\/www.php.net\/archive\/2026.php\" target=\"_blank\" rel=\"noopener\">PHP project&#8217;s announcement<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How we patched PHP servers in about an hour<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By late morning we had a list of every PHP install across our servers. It took minutes, not days. Every one was on a vulnerable version. That list is the reason the morning stayed calm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next we sorted the list by what faces the internet. Those went first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before changing anything, we looked for signs someone had already got in. We checked for web shells (small hidden files that give an attacker remote control), stray PHP files in upload folders, and tampered WordPress settings. We found none. The odd traffic in our logs was ordinary password-guessing on WordPress logins, not this exploit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then we took a snapshot of each server. A snapshot is a saved copy of the machine as it is right now, so we could undo any patch in seconds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our WordPress sites, our file-sharing server&#8217;s container image and our test copies were patched within about an hour. We used the security packages from the Linux distributions, such as <a href=\"https:\/\/security-tracker.debian.org\/tracker\/CVE-2026-109618\" target=\"_blank\" rel=\"noopener\">Debian&#8217;s DSA-6574-1<\/a> and <a href=\"https:\/\/ubuntu.com\/security\/notices\/USN-8948-1\" target=\"_blank\" rel=\"noopener\">Ubuntu&#8217;s USN-8948-1<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We did not trust the version number alone. Distributions often fix a bug without changing PHP&#8217;s headline version. Ubuntu&#8217;s fix for its older 22.04 release, for example, is a build of PHP 8.1. So for each package we read the changelog to confirm the CVE fix was listed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then we restarted the PHP workers. A patched file on disk does nothing until the running program reloads it. Last, we checked that every site answered normally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When you can&#8217;t patch yet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One third-party app had no fixed version from its vendor yet. We still had to protect it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sansec&#8217;s stopgap is to block multipart\/form-data requests, the format browsers use to upload files. <a href=\"https:\/\/sansec.io\/research\/php2shell\" target=\"_blank\" rel=\"noopener\">Sansec<\/a> says every known trigger uses it. Our proxy now rejects those requests for that app.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The cost is that the app loses its upload feature for a few days. We think that trade is worth it. Sansec warns the rule can also break some forms, so test after you add it, and remove it once the real fix is in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.php.net\/archive\/2026.php\" target=\"_blank\" rel=\"noopener\">PHP&#8217;s own notes<\/a> say partial measures reduce exposure but do not make an install safe. Only the update does.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One more catch from PHP: if you installed PHP from the volunteer-run Remi repository, it had no update on Oct. 21. Switch to your distribution&#8217;s packages or build from source.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Our take<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is our view, and you may see it differently. We think the fix itself was the easy part. The hard part is knowing what you run and getting in front of it before it bites you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A small office doesn&#8217;t need fancy tools for that. A simple list of your websites, who hosts them and what PHP version each uses turns a scary morning into routine work. We&#8217;d also take a small, reversible trade, like losing uploads for a few days, over leaving a door open while waiting on a vendor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What to do this week<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ask your host<\/strong> which PHP version your site runs and when it was patched. PHP 8.1 and older get no official fix, so ask about a backport or a move.<\/li>\n\n\n\n<li><strong>Write down what you run:<\/strong> each website, where it is hosted and who looks after it.<\/li>\n\n\n\n<li><strong>If you manage your own server,<\/strong> snapshot first, patch internet-facing sites first, and read the package changelog for the CVE numbers.<\/li>\n\n\n\n<li><strong>Restart PHP<\/strong> after patching, then click through your site to confirm it works.<\/li>\n\n\n\n<li><strong>Can&#8217;t patch yet?<\/strong> Ask your IT person about blocking file-upload requests at the edge, and test your forms afterward.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;d like a second pair of eyes, we offer a <a href=\"https:\/\/rainier-it.com\/contact\/?service=Free%2030-minute%20assessment\">free 30-minute assessment<\/a>. We look at your computers, email and backups and tell you what to fix first. No cost, no contract. You can also read about <a href=\"https:\/\/rainier-it.com\/security\/\">our security services<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/sansec.io\/research\/php2shell\" target=\"_blank\" rel=\"noopener\">PHP2Shell: Critical PHP RCE<\/a> (Sansec)<\/li>\n\n\n\n<li><a href=\"https:\/\/www.php.net\/archive\/2026.php\" target=\"_blank\" rel=\"noopener\">PHP 2026 release announcements<\/a> (PHP project)<\/li>\n\n\n\n<li><a href=\"https:\/\/security-tracker.debian.org\/tracker\/CVE-2026-109618\" target=\"_blank\" rel=\"noopener\">CVE-2026-109618 security tracker entry<\/a> (Debian)<\/li>\n\n\n\n<li><a href=\"https:\/\/ubuntu.com\/security\/notices\/USN-8948-1\" target=\"_blank\" rel=\"noopener\">USN-8948-1: PHP vulnerabilities<\/a> (Ubuntu)<\/li>\n\n\n\n<li><a href=\"https:\/\/watchtowr.com\/intelligence\/php-remote-code-execution-php2shell\/\" target=\"_blank\" rel=\"noopener\">PHP Remote Code Execution (PHP2Shell)<\/a> (watchTowr)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>This article was drafted by Percival, Rainier IT&#8217;s AI writing assistant, from the sources linked above, and reviewed by Christopher Engelhardt before publication. Spot an error? Email <a href=\"mailto:support@rainier-it.com\">support@rainier-it.com<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We patched PHP servers the same day PHP2Shell broke. Here&#8217;s the order we worked in, and the steps a small office can copy.<\/p>\n","protected":false},"author":1,"featured_media":822,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[35,40,41,43],"series":[],"class_list":["post-728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-cybersecurity","tag-patch-management","tag-small-business","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/posts\/728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/comments?post=728"}],"version-history":[{"count":3,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/posts\/728\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/posts\/728\/revisions\/739"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/media\/822"}],"wp:attachment":[{"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/media?parent=728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/categories?post=728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/tags?post=728"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/rainier-it.com\/blog\/wp-json\/wp\/v2\/series?post=728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}