<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Backlog</title>
    <description>The latest articles on DEV Community by Backlog (@backlog).</description>
    <link>https://dev.to/backlog</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4200196%2Fd7167693-15b6-4d8d-be03-fd1dd49c102d.png</url>
      <title>DEV Community: Backlog</title>
      <link>https://dev.to/backlog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/backlog"/>
    <language>en</language>
    <item>
      <title>One Line in a Dockerfile: How We Patched Critical PHP RCE Bugs in Minutes</title>
      <dc:creator>Backlog</dc:creator>
      <pubDate>Thu, 22 Oct 2026 10:24:14 +0000</pubDate>
      <link>https://dev.to/backlog/one-line-in-a-dockerfile-how-we-patched-critical-php-rce-bugs-in-minutes-19ec</link>
      <guid>https://dev.to/backlog/one-line-in-a-dockerfile-how-we-patched-critical-php-rce-bugs-in-minutes-19ec</guid>
      <description>&lt;p&gt;On 21 October 2026, the PHP project released fixes for two critical vulnerabilities. Both are rated 9.2 on the CVSS v4.0 scale, and both can allow unauthenticated remote code execution. Hosting providers have warned that exploitation is already happening. Here is what the bugs are, how to fix them, and why running PHP in containers made our response much simpler.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was disclosed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CVE-2026-109618&lt;/strong&gt; is remote code execution through out-of-memory corruption. If PHP runs out of memory while it is building internal request data, it can be interrupted with that data only partly initialised. Request cleanup may then treat the invalid data as valid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CVE-2026-109619&lt;/strong&gt; is remote code execution through stale global state. Request-owned internal state can outlive the memory behind it. A later request on the same worker may use that stale state before it is reset.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An attacker needs no login, because the problem sits in how PHP handles the request itself. PHP's advisory says the risk is highest with &lt;code&gt;mod_php&lt;/code&gt;, where the attack can run before any application code does. PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are also affected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixed versions
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Branch&lt;/th&gt;
&lt;th&gt;Fixed in&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PHP 8.5&lt;/td&gt;
&lt;td&gt;8.5.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP 8.4&lt;/td&gt;
&lt;td&gt;8.4.27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP 8.3&lt;/td&gt;
&lt;td&gt;8.3.36&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP 8.2&lt;/td&gt;
&lt;td&gt;8.2.35 (end of life on 31 December 2026)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;PHP 8.1 and older no longer get updates from the PHP project. Source-only backports exist for 7.4, 8.0 and 8.1. If you run one of those versions, upgrade, or ask your vendor for a backported fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The only complete fix is updating
&lt;/h2&gt;

&lt;p&gt;The advisory lists interim mitigations, such as disabling &lt;code&gt;session.upload_progress.enabled&lt;/code&gt;, capping request sizes, and avoiding &lt;code&gt;RLIMIT_AS&lt;/code&gt; limits. They narrow the known attack paths but do not close the holes. PHP itself warns that other variants may exist. Treat them as a stopgap while you patch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Patching a traditional server
&lt;/h2&gt;

&lt;p&gt;On a classic VPS or shared panel, the fix looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Take a snapshot or backup.&lt;/li&gt;
&lt;li&gt;Wait for your distribution or control panel to publish a patched package. Some third-party repositories do not ship on release day.&lt;/li&gt;
&lt;li&gt;Update PHP, and every other PHP version installed on the machine.&lt;/li&gt;
&lt;li&gt;Restart PHP-FPM, Apache or whatever serves PHP. Without a restart the old code keeps running.&lt;/li&gt;
&lt;li&gt;Check the version actually in use, with &lt;code&gt;php -v&lt;/code&gt; and with a &lt;code&gt;phpinfo()&lt;/code&gt; page, because the CLI and the web server can use different binaries.&lt;/li&gt;
&lt;li&gt;Repeat for every server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step is easy to forget, and mistakes tend to show up only after an attacker finds them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Patching a containerised deployment
&lt;/h2&gt;

&lt;p&gt;Our production environment runs PHP-FPM and nginx in a Docker image. The PHP version is declared in a single line of the Dockerfile, so the fix was a one-line change per base image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# before&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; php:8.4-fpm-bookworm&lt;/span&gt;

&lt;span class="c"&gt;# after&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; php:8.4.27-fpm-bookworm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we rebuilt the image without cache and redeployed. In addition, we turned off &lt;code&gt;session.upload_progress.enabled&lt;/code&gt; in the image's &lt;code&gt;php.ini&lt;/code&gt; as defence in depth.&lt;/p&gt;

&lt;p&gt;This approach has several advantages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is no drift.&lt;/strong&gt; The image contains PHP, its extensions and its configuration. Every container is built from the same recipe, so no server is left on an old version. There are no forgotten PHP installs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The restart is built in.&lt;/strong&gt; A redeploy replaces the running containers, so every worker starts on the new binary. The step where the old code keeps running because nobody restarted it disappears.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix is reviewable and reversible.&lt;/strong&gt; The change is a small commit that can be peer-reviewed, tested in CI and rolled back if something goes wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can test what you ship.&lt;/strong&gt; We ran the full test suite against the exact PHP version production will use, before it reaches production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification is simple.&lt;/strong&gt; Running &lt;code&gt;php -v&lt;/code&gt; inside the container reports exactly the version that serves traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The attack surface is smaller.&lt;/strong&gt; The container holds what the application needs and little else: no control panel, no other sites and no leftover tools. If an attacker did get code execution, they would land in a disposable container rather than on a shared host. We could discard it and redeploy a clean one in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pin your versions
&lt;/h2&gt;

&lt;p&gt;One detail matters more than it looks. A floating tag such as &lt;code&gt;php:8.4-fpm&lt;/code&gt; only moves to 8.4.27 if the build pulls the base image fresh. A cached layer can quietly keep the vulnerable PHP. Pinning to the exact patched version, or building with &lt;code&gt;--pull --no-cache&lt;/code&gt;, removes that risk. It also makes the PHP version in each deployment visible in your git history.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on honesty
&lt;/h2&gt;

&lt;p&gt;Containers do not make a PHP vulnerability harmless. This bug is in PHP itself, so a container running a vulnerable version is just as exposed as a server running one. What Docker gives you is speed, consistency and a smaller blast radius, and those matter most when a critical patch is out and attackers are probing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Back up or snapshot.&lt;/li&gt;
&lt;li&gt;Update PHP to a fixed version: 8.5.12, 8.4.27, 8.3.36 or 8.2.35.&lt;/li&gt;
&lt;li&gt;Rebuild and redeploy containers, or restart PHP-FPM and the web server on traditional hosts.&lt;/li&gt;
&lt;li&gt;Confirm the running version with &lt;code&gt;php -v&lt;/code&gt; inside the container or on the server.&lt;/li&gt;
&lt;li&gt;Plan an upgrade if you are on PHP 8.2 or older.&lt;/li&gt;
&lt;li&gt;Look for signs of compromise: unknown files in web directories, new cron jobs, odd processes, and spikes in load or outbound traffic.&lt;/li&gt;
&lt;li&gt;Rotate secrets such as application keys and database credentials if anything looks suspicious.&lt;/li&gt;
&lt;li&gt;Enable automatic security updates or scheduled image rebuilds, so the next patch needs less effort.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.php.net/archive/2026.php#2026-10-21-5" rel="noopener noreferrer"&gt;PHP security advisory of 21 October 2026&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>php</category>
      <category>security</category>
    </item>
  </channel>
</rss>
