<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PHP on Schallbert's Blog</title><link>https://blog.schallbert.de/en/tags/php/</link><description>Recent content in PHP on Schallbert's Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 21 Oct 2026</lastBuildDate><atom:link href="https://blog.schallbert.de/en/tags/php/index.xml" rel="self" type="application/rss+xml"/><item><title>PHP2shell: Kritische Sicherheitslücken</title><link>https://blog.schallbert.de/en/php2shell-critical-vulnerability-rce/</link><pubDate>Wed, 21 Oct 2026</pubDate><author>Schallbert</author><guid>https://blog.schallbert.de/en/php2shell-critical-vulnerability-rce/</guid><description type="html">&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2026-10-21-php2shell-logo-cover.avif"&#10; class="post-cover"&#10; alt="Image: The logo for php2shell. It is blue, block-like pixel text on black background."&#10; title="PHP2shell: Kritische Sicherheitslücken" /&gt;&#10;&lt;h2 id="step-1-recognition-we-have-a-problem"&gt;Step 1: Recognition: We have a problem.&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: PHP currently has &lt;a href="https://www.php.net/archive/2026.php#2026-10-20-1" target="_blank" rel="noopener noreferrer" class="external-link"&gt;two critical vulnerabilities&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; that allow for Remote Code Execution. Their identifiers are &lt;a href="https://cert.europa.eu/publications/security-advisories/2026-018/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CVE-2026-109618 and CVE-2026-109619&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Since the root cause lies within the engine itself, rather than the frontend, the only solution is to update to &lt;a href="https://watchtowr.com/intelligence/php-cve-2026-109618-faq/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2026-10-21-phps-php2shell-notice.avif" alt="Image: Screenshot of the PHP News Archive webpage on 21-Oct-2026 about a critical vulnerability allowing Remote Code Execution if exploited even before any application code runs."&gt;&lt;/figure&gt;&#10;&lt;p&gt;&amp;ldquo;I don&amp;rsquo;t use &lt;a href="https://www.php.net/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;PHP&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; on &lt;a href="https://blog.schallbert.de/en/projects/migrating-jekyll-to-hugo/"&gt;my website&lt;/a&gt;,&amp;rdquo; I think to myself upon receiving the following message this morning:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&amp;ldquo;Hi, quick heads-up: You might want to [&amp;hellip;] disconnect anything that uses PHP for now; [&amp;hellip;] a patch is coming later today.&amp;rdquo;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Or am I affected after all&amp;hellip;? I do use a managed Nextcloud instance, and &lt;a href="https://docs.nextcloud.com/server/stable/developer_manual/getting_started/glossary.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;isn&amp;rsquo;t Nextcloud written in &lt;em&gt;PHP&lt;/em&gt;, among other things&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;&amp;hellip;? As I write these lines, &lt;a href="https://github.com/nextcloud/all-in-one/releases/tag/v14.4.1" target="_blank" rel="noopener noreferrer" class="external-link"&gt;a fix for Nextcloud is becoming available&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Everything has to happen very quickly. There will certainly be a lot of overtime worked today.&lt;/p&gt;&#10;&lt;h3 id="status-october-21-2026-1030-am-cest"&gt;Status: October 21, 2026, 10:30 AM CEST&lt;/h3&gt;&#10;&lt;p&gt;Let&amp;rsquo;s rewind ten hours. There is no fix yet. Information about the CVEs has leaked and is already a few hours old. According to &lt;a href="https://en.wikipedia.org/wiki/PHP2Shell" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Wikipedia, &lt;code&gt;69%&lt;/code&gt; of all websites use PHP&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. Exploiting such a highly critical vulnerability (with a &lt;a href="https://blog.schallbert.de/en/gitea-critical-vulnerability-active-exploitation-rce/#cvss-scoring"&gt;score&lt;/a&gt; of &lt;code&gt;9.2&lt;/code&gt;) in such a widely used technology naturally has a huge blast radius. Consequently, &amp;ldquo;the internet&amp;rdquo; is quite nervous.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&amp;ldquo;[&amp;hellip;] organisations should consider isolating internet-facing applications from public networks until a fix is ​​applied and verified.&amp;rdquo; — &lt;a href="https://cert.europa.eu/publications/security-advisories/2026-018/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;CERT-EU&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, accessed October 21, 2026, 10:40 AM&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Interesting. The recommendation is to &amp;ldquo;take it offline for now.&amp;rdquo;&lt;/p&gt;&#10;&lt;h2 id="step-2-immediate-measures-taking-nextcloud-offline"&gt;Step 2: Immediate Measures: Taking Nextcloud Offline&lt;/h2&gt;&#10;&lt;p&gt;To get ahead of a potential attack, I attempt to take my instance offline. I log in to my hoster&amp;rsquo;s platform, navigate to the &amp;ldquo;Settings&amp;rdquo; tab, and click on the &lt;code&gt;ownCloud Console&lt;/code&gt; section. This is Nextcloud&amp;rsquo;s command-line interface.&lt;/p&gt;&#10;&lt;p&gt;Once there, I discover that there is no command available to shut down or &amp;ldquo;de-publish&amp;rdquo; the instance. So, I opt for the next best thing:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;occ maintenance:mode --on&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So, I put my instance into &lt;a href="https://docs.nextcloud.com/server/stable/admin_manual/maintenance/backup.html#maintenance-mode" target="_blank" rel="noopener noreferrer" class="external-link"&gt;maintenance mode&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. This prevents new logins and freezes the database. Afterward, I read up a bit on the CVEs to see if this step is sufficient.&lt;/p&gt;&#10;&lt;p&gt;Apparently, it is not.&lt;/p&gt;&#10;&lt;p&gt;Through various forums and &lt;a href="https://thehackernews.com/2026/10/php2shell-two-unpatched-critical-php.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;HackerNews&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, I learn that an unauthenticated request can trigger the attack before any PHP code is even executed on the server side.&lt;/p&gt;&#10;&lt;p&gt;In other words, it doesn&amp;rsquo;t matter what state I set my instance to, as long as it is connected to the network, it remains vulnerable.&lt;/p&gt;&#10;&lt;h2 id="step-3-interim-containment-having-the-nextcloud-instance-taken-offline"&gt;Step 3: Interim Containment: ​​Having the Nextcloud Instance taken offline&lt;/h2&gt;&#10;&lt;p&gt;Even after several online searches, I cannot find a way to shut down my managed instance myself. I briefly consider killing the name resolution and DNS routing, but I quickly realize that by the time those changes propagate, the fix will likely already be available.&lt;/p&gt;&#10;&lt;h3 id="status-october-21-2026-1143-am-cest"&gt;Status: October 21, 2026, 11:43 AM CEST&lt;/h3&gt;&#10;&lt;p&gt;So, I submit a support ticket to my hoster, requesting assistance in taking my instance offline.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2026-10-21-hoster-response-takedown.avif" alt="Image: Screenshot of an E-mail from my hoster, stating that my Nextcloud instance has been deactivated until a patch is available and in place."&gt;&lt;/figure&gt;&#10;&lt;h3 id="status-october-21-2026-1201-pm-cest"&gt;Status: October 21, 2026, 12:01 PM CEST&lt;/h3&gt;&#10;&lt;p&gt;I receive an email from my hoster!&lt;/p&gt;&#10;&lt;p&gt;Sure enough, I can no longer access the instance. I&amp;rsquo;m met with an &lt;code&gt;ERR_CERT_COMMON_NAME_INVALID&lt;/code&gt; error. Dismissing that, a message appears: &lt;strong&gt;REQUESTED PAGE LOCKED&lt;/strong&gt;. Well done. The provider&amp;rsquo;s response time, including notifying the customer, was just 18 minutes.&lt;/p&gt;&#10;&lt;figure class="media-frame media-frame--center"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2026-10-21-instance-locked.avif" alt="Image: A flatscreen showing a &amp;#39;no entry&amp;#39; symbol, connected to multiple small boxes that look like mini servers. Image caption says &amp;#39;Requested page locked&amp;#39;."&gt;&lt;/figure&gt;&#10;&lt;p&gt;Now, I shift from participant to observer. I&amp;rsquo;m seeing initial exploit attempts (or at least claims of them) circulating online, which brings to mind a slide from a presentation I recently watched: &lt;a href="https://kernel-recipes.org/en/2026/security-in-the-llm-age/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Security in the LLM age&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; (at the &lt;code&gt;11:24&lt;/code&gt; mark).&lt;/p&gt;&#10;&lt;p&gt;In it, a Linux kernel expert points out that, as of 2026, exploits are appearing in the wild an average of seven days &lt;em&gt;before&lt;/em&gt; a patch for the affected software is even released.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code class="language-log" data-lang="log"&gt;discover --&amp;gt; disclose --&amp;gt; patch --&amp;gt; deploy&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This traditional sequence of events only works well against &amp;ldquo;slow&amp;rdquo; attackers. We need something that allows us to get back ahead of the situation.&lt;/p&gt;&#10;&lt;h2 id="step-4-monitoring-the-situation---patch-availability-and-initial-deployment"&gt;Step 4: Monitoring the Situation - Patch Availability and Initial Deployment&lt;/h2&gt;&#10;&lt;p&gt;According to &lt;a href="https://thehackernews.com/2026/10/php-issues-emergency-patches-for-two.html" target="_blank" rel="noopener noreferrer" class="external-link"&gt;The Hacker News&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, the patch is set to become available around &lt;strong&gt;4:00 PM CEST&lt;/strong&gt;. I am obtaining the RSS feed from my hosting provider and awaiting further updates.&lt;/p&gt;&#10;&lt;h3 id="status-october-21-2026-1420-cest"&gt;Status: October 21, 2026, 14:20 CEST&lt;/h3&gt;&#10;&lt;p&gt;The Federal Office for Information Security (BSI) has also issued an &lt;a href="https://www.bsi.bund.de/SharedDocs/Cybersicherheitswarnungen/DE/2026/2026-297981-1032.pdf?__blob=publicationFile&amp;amp;v=4" target="_blank" rel="noopener noreferrer" class="external-link"&gt;IT security advisory&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, which classifies the vulnerability as having a &amp;ldquo;criticality level of 3/Orange&amp;rdquo; and notes the following:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&amp;ldquo;Der Patch für die Schwachstelle ist heute 16 Uhr deutscher Zeit (14:00 UTC) angekündigt und sollte unverzüglich zu diesem Zeitpunkt installiert werden.&amp;rdquo; - BSI, 21.10.2026&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;figure class="media-frame media-frame--right"&gt;&#10; &lt;img src="https://blog.schallbert.de/assets/images/posts/2026-10-21-hoster-vulnerability-notice.avif" alt="Image: Screenshot of my hoster&amp;#39;s notification feed for the PHP vulnerabilities in question. There are multiple entries at different points in time, all dated 21-Oct-2026."&gt;&lt;/figure&gt;&#10;&lt;h3 id="status-21102026-1634-cest"&gt;Status 21.10.2026 16:34 CEST&lt;/h3&gt;&#10;&lt;p&gt;My hoster &lt;a href="https://status.hetzner.com/de/incident/f4144d55-38c3-48d1-8664-7a3429355cd7" target="_blank" rel="noopener noreferrer" class="external-link"&gt;reports that patches are now available&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; and that implementation has begun. Affected systems include not only the Nextcloud instances but also the hoster&amp;rsquo;s entire administration interface and their webmail service.&lt;/p&gt;&#10;&lt;h3 id="status-21102026-1952-cest"&gt;Status 21.10.2026 19:52 CEST&lt;/h3&gt;&#10;&lt;p&gt;My hoster reports that the patches have been successfully applied to their web hosting services and managed servers.&lt;/p&gt;&#10;&lt;h3 id="status-21102026-2240-cest"&gt;Status 21.10.2026 22:40 CEST&lt;/h3&gt;&#10;&lt;p&gt;Hetzner&amp;rsquo;s &lt;em&gt;KonsoleH&lt;/em&gt; application, which I use to manage my Nextcloud instance, is down.&lt;/p&gt;&#10;&lt;h3 id="status-21102026-2300-cest"&gt;Status 21.10.2026 23:00 CEST&lt;/h3&gt;&#10;&lt;p&gt;&lt;em&gt;KonsoleH&lt;/em&gt; is back online (and patched).&lt;/p&gt;&#10;&lt;h2 id="step-5-insights-and-conclusions"&gt;Step 5 Insights and Conclusions&lt;/h2&gt;&#10;&lt;p&gt;What have I learned from the events of this turbulent day? How should I handle security vulnerabilities in the future? And how can I even tell when a problem exists?&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;It is not just the service as a whole that is vulnerable, but its individual components as well. &amp;ndash;&amp;gt; Know all your components and keep an eye out for vulnerabilities and patches!&lt;/li&gt;&#10;&lt;li&gt;Adversaries have become incredibly fast (thanks to LLMs). &amp;ndash;&amp;gt; Expect exploits to appear even before patches are available!&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;I am currently compiling a list of reliable sources for information on vulnerabilities, news, and patches. Once the list is finalized, I will share it.&lt;/p&gt;&#10;&lt;h2 id="step-6-actions"&gt;Step 6 Actions&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Remove sensitive data from the network whenever possible. Line of thought: What if this were to disappear? Would availability within the LAN/intranet suffice?&lt;/li&gt;&#10;&lt;li&gt;Improved monitoring and abuse detection are the logical next steps: detect early, block early, report early, shut down early, and patch immediately.&lt;/li&gt;&#10;&lt;li&gt;Identify standard sources for information regarding the software in use. Perhaps build a CVE list scanner? Or a Hacker News filter?&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h3 id="addendum-oct-22-2026-0930-cest"&gt;Addendum: Oct 22, 2026, 09:30 CEST&lt;/h3&gt;&#10;&lt;p&gt;The hoster has patched my Nextcloud instance and brought it back online. All of my systems are back to normal. There is now also a &lt;a href="https://de.wikipedia.org/wiki/PHP2Shell" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Wikipedia entry&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; on the subject, which is kept very up to date.&lt;/p&gt;&#10;&lt;h2 id="step-7-initial-reflection"&gt;Step 7: Initial Reflection&lt;/h2&gt;&#10;&lt;p&gt;A few days have passed since the two security vulnerabilities were publicly disclosed and patches were made available. Let&amp;rsquo;s take a look at the current landscape across the web.&lt;/p&gt;&#10;&lt;h3 id="status-october-24-2026-1630-cest"&gt;Status: October 24, 2026, 16:30 CEST&lt;/h3&gt;&#10;&lt;p&gt;There are now many, many proofs of concept (PoCs) demonstrating how to exploit these PHP vulnerabilities. &lt;a href="https://github.com/search?q=php2shell&amp;amp;type=repositories" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Most notably on the platform GitHub&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Personally, I am not an expert in this field, so I have to rely on the assessments of others regarding the quality of these PoCs, the actual feasibility of exploiting them &amp;ldquo;in the wild,&amp;rdquo; and the reasons why this particular vulnerability accumulated such significant media attention.&lt;/p&gt;&#10;&lt;p&gt;In general, the rule is, of course: &lt;strong&gt;&amp;ldquo;Patch first, ask questions later.&amp;rdquo;&lt;/strong&gt; That is exactly what I did. To quote Felix von Leitner once again:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&amp;ldquo;One of the lessons learned from 20 years of working in the security field is that when one person claims a bug exists, and another claims it isn&amp;rsquo;t exploitable, it almost always turns out, in hindsight, that it was exploitable after all.&amp;rdquo; - Feliks von Leitner, alias &lt;a href="https://codeberg.org/tomas-jakobs/fefe-blog-backup/src/branch/main/content/2014/04" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Fefe, April 12, 2014&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, accessed October 24, 2026&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Regarding exploitability, &lt;a href="https://flare.io/learn/resources/blog/php2shell-exploits-underground-analysis" target="_blank" rel="noopener noreferrer" class="external-link"&gt;flare.io&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; which describes itself as a threat intelligence site, notes that most proof-of-concept (PoC) exploits for PHP2shell only functioned within laboratory environments. They are rarely applicable to real-world targets. Either because they require internal operational knowledge of the systems being attacked, because they depend on other vulnerabilities (such as the disabling of memory randomization), or because the PoCs themselves are merely &amp;ldquo;AI-slop&amp;rdquo;: poorly validated, hastily written software that promises more than it delivers.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://eliastaylor.com/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;eliastaylor&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; expresses a similar view:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&amp;ldquo;There isn&amp;rsquo;t an easy exploit for this PHP vulnerability.&amp;rdquo; - &lt;a href="https://eliastaylor.com/noexploit/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;https://eliastaylor.com/noexploit/&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;, accessed October 24, 2026&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Writing less than ten hours after the attack vector and patch were released, he argues that:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;none of the proof-of-concept (PoC) exploits actually work. Not even on a standard installation and configuration of a pre-patch version of PHP&lt;/li&gt;&#10;&lt;li&gt;these two CVEs are far less critical than other historical security vulnerabilities (citing &lt;a href="https://en.wikipedia.org/wiki/Heartbleed" target="_blank" rel="noopener noreferrer" class="external-link"&gt;Heartbleed&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt; in OpenSSL as an example)&lt;/li&gt;&#10;&lt;li&gt;the exploits were not crafted by actual humans, but rather generated with the help of LLMs.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The core of the argument is that people are delegating their cognitive work to language models, failing to verify whether the system is actually doing what it claims to do. Let alone reading, understanding, or improving the code the system generates. Malicious botnets are still crafted by human hands, a process that takes time, especially when the vulnerabilities are not obvious or trivial to exploit.&lt;/p&gt;&#10;&lt;p&gt;As a brief exercise to help form an own assessment of the situation, I recommend scanning the &amp;ldquo;issue&amp;rdquo; discussions found on the GitHub repositories for many of these &amp;ldquo;PHP2Shell&amp;rdquo; PoCs.&lt;/p&gt;&#10;&lt;p&gt;However, the significant media attention has some advantages: it seems the &lt;a href="https://phpvulnerabilities.app/affected-products/" target="_blank" rel="noopener noreferrer" class="external-link"&gt;world is patching quickly&lt;span class="external-link-icon" aria-hidden="true"&gt;↗&lt;/span&gt;&lt;/a&gt;. I&amp;rsquo;ve taken a look at the discourse across various German and international forums: everywhere, people are pushing their hosting providers to apply patches, discussing the potential impact, and tracking which vendors have already released updates.&lt;/p&gt;&#10;&lt;p&gt;That still leaves the question of who actually benefits from all this. I have a few theories. However, it is still too early to draw conclusions or form a judgment.&lt;/p&gt;&#10;</description></item></channel></rss>