Home › Blog › PHP's critical October 2026 fixes on a Mac: Homebrew, MacPorts, MAMP, Server.app and the firewall

PHP's critical October 2026 fixes on a Mac: Homebrew, MacPorts, MAMP, Server.app and the firewall

Published 2026-10-22

On 21 October 2026 at 14:00 UTC, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, a day after announcing them in advance. They fix two critical flaws, each rated 9.2 under CVSS v4.0, that can let an unauthenticated request run code on the server. php.net is blunt about it: there are no complete mitigations, and updating is the only safe choice.

Most of the coverage assumes a Linux host, where the distribution's package arrives and you install it. A Mac is different. Whether you are fixed today depends on where your PHP came from, and at the time of writing (22 October 2026) the answer is different for Homebrew, MacPorts, MAMP and Apple's own PHP. This post goes through each, then the firewall in front of them.

The two flaws

Every PHP that serves web requests is affected: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. php.net rates mod_php the highest risk, with a demonstrated exploit in which an unauthenticated request triggers the flaw before any application code runs. Your own code, plug-ins and login pages don't stand in the way.

PHP 8.1 and older get no upstream release. For people who build from source, the security team has published minimal backports for 7.4, 8.0 and 8.1 as branches in php-src (for example PHP-8.1-CVE-2026-109618-109619). Nothing older than 7.4 has one.

Homebrew: fixed, but restart PHP-FPM

Homebrew packaged the new releases on 21 October: php is at 8.5.12, and [email protected], [email protected] and [email protected] are at 8.4.27, 8.3.36 and 8.2.35. So brew upgrade php (or brew upgrade [email protected], and so on) brings in the fix. If you have turned off Homebrew's automatic update, run brew update first.

MacPorts: fixed, once you upgrade

MacPorts published the fixed versions on 22 October: php85 8.5.12, php84 8.4.27 and php83 8.3.36. port install leaves a port that is already installed at its old version, so upgrade explicitly:

sudo port selfupdate
sudo port upgrade outdated
sudo port reload php84-fpm

Use the -fpm port that matches your branch. The reload matters for the same reason as on Homebrew. port installed | grep php lists what is there.

MAMP: wait for MAMP

MAMP ships its own PHP builds. They don't come from Homebrew or MacPorts, and they change only when MAMP releases an update. Until it does, put the interim settings in the php.ini MAMP uses for each PHP version you serve, and restart MAMP's servers. If MAMP only serves your own Mac while you develop, the exposure is small. If it serves a website to your network or the internet, treat it like any other server.

Apple's PHP and Server.app: no fix is coming

Old Macs still running Apple's Server.app (the macOS 10.13 era) serve their websites with Apple's PHP 7.1, loaded into Apache as mod_php. That is the worst combination this advisory describes: the highest-risk way of running PHP, on a version too old even for the source backports, which start at 7.4. Apple won't update it. (Macs from macOS 12 on don't include PHP at all.)

The fix is to move the websites to a supported PHP on PHP-FPM, beside Apple's. We described how in Another ten years from the Mac servers you already own: MacPorts PHP 8.5, every site checked before and after, and a switch back if one breaks. FrontierStack's Modernize pane now moves those sites to PHP 8.5.12 or later and refuses anything older. Moving takes the sites off mod_php, the setup the advisory calls the most exposed. If a site can't move yet, ask whether it needs to be public at all: an intranet page only staff use can be limited to the office network or a VPN.

OPNsense and pfSense: PHP on the firewall

Firewalls run PHP too. OPNsense's web GUI is written in PHP and runs as root, and its captive portal serves PHP pages to guest devices, so on a guest network the very devices you are keeping out are the ones talking to it. At the time of writing OPNsense hasn't announced a fix. FreeBSD's ports tree already has the patched PHP (8.3.36, 8.4.27 and 8.5.12), but OPNsense ships PHP in its own firmware packages, and a user on the OPNsense forum noted that 26.1 is still on PHP 8.3.30.

pfSense also uses PHP, served by nginx and php-fpm. Netgate hadn't published an advisory at the time of writing. The same advice applies: update through pfSense's own update mechanism when Netgate ships a fix, and keep the GUI off untrusted networks until then.

Linux servers: check the tracker, not the version number

php.net says Linux distributions and LTS vendors received the patches in advance. Many backport a fix into the PHP version they already ship, so a fixed server can still report a lower number than 8.2.35 or 8.4.27. Look up CVE-2026-109618 and CVE-2026-109619 in your distribution's security tracker rather than comparing versions, and restart PHP-FPM or Apache after the package update.

If you can't update yet

php.net lists settings that reduce exposure to specific attack paths. It says plainly that they don't make an installation safe, so treat them as a bridge to the update, not a substitute for it.

What to do today

  1. List every machine that serves PHP, and where each PHP came from: Homebrew, MacPorts, MAMP, Apple, a Linux distribution or the firewall's firmware.
  2. Homebrew: upgrade each PHP formula, restart PHP-FPM and Apache, and check the version.
  3. MacPorts: run sudo port selfupdate, upgrade the PHP ports, reload PHP-FPM and check the version.
  4. MAMP: apply the interim settings and restart now, then update MAMP as soon as it ships the fixed PHP.
  5. Apple's PHP on Server.app: plan the move to PHP-FPM this week, and until then limit who can reach sites that don't need to be public.
  6. Linux: install your distribution's update, confirm both CVEs in its tracker, and restart PHP.
  7. Firewalls: keep the OPNsense or pfSense GUI on trusted networks only, and update through the firmware updater when the fix ships.
  8. Check what is actually running. php -v shows the command-line PHP, which isn't always the one serving your sites. Confirm the version the web server uses too, and if you use a phpinfo() page for that, delete it straight afterwards.

How FrontierStack helps

FrontierStack doesn't replace any of the steps above. Its next update makes them quicker to find and harder to forget.

All three read and report. Changes are made through the source each PHP came from, and only with your approval.

Sources: php.net's advance notice of 20 October and release announcement of 21 October 2026, the two php-src advisories linked above, and the Homebrew, MacPorts and FreeBSD package indexes as checked on 22 October 2026. Package versions change quickly in the days after a release; check them again before you rely on them.

Run it from your Mac.

FrontierStack installs, monitors and secures services on this Mac and on linked servers; and keeps your passwords and keys out of any AI's sight.

Download FrontierStack

Apple notarized · Safe & secure · macOS 13 Ventura+