PHP2Shell: Audit and Patch Legacy PHP Apps
CVE-2026-109618 and CVE-2026-109619 are known-exploited PHP flaws. Patch the fixed branch, and take public PHP 8.1 and older offline until it is updated.
By Muhammad Saif and Aashan Khan · Techtribe co-founders
PHP2Shell is the public name for two critical flaws in PHP, CVE-2026-109618 and CVE-2026-109619. CISA's alert, Critical Vulnerabilities in PHP Require Immediate Patching, says they allow unauthenticated remote code execution on PHP that serves the web, and that CISA added both to the Known Exploited Vulnerabilities catalog on October 26, 2026. The alert's last update on that page is October 26. The vulnerabilities were not theoretical by then. They were on the list CISA reserves for flaws people are already using.
The affected setups, in CISA's words, are all PHP installations serving web requests. The alert names Apache with mod_php as the configuration PHP itself considers highest risk, and also names PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed. Application code does not have to be wrong. The flaw is in the runtime that accepts the request. A one-file script that only prints a response is still a PHP runtime on the network. That is the fact that makes a "legacy marketing site" matter as much as the main product.
On November 19, 2026 PHP published another security release for the supported branches. BleepingComputer reported fixes for 18 flaws, including critical issues, in 8.5.13, 8.4.28, 8.3.37, and 8.2.36. Unit 42's threat brief, updated the same day, treats that drop as a further patch train on top of the October PHP2Shell fixes. Installing 8.2.35 and stopping is how a team honestly fixes the October advisory and remains exposed to what November shipped. This note uses the October versions as the floor for the two named CVEs and the November versions as the version you actually want on a supported branch.
Nothing here describes how the flaws are triggered. Defenders do not need the trigger to inventory a fleet, upgrade a package, or take an unsupported interpreter off the internet. If you want the patch-clock context for why "we will do it next sprint" is a long time, read how agents turn public patches into exploits. PHP's October release is one of the clocks that article is about. The November 19 bundle started another one.
The versions, without the folklore
CISA tells organizations to update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35 to fix CVE-2026-109618 and CVE-2026-109619. Those are the first fixed releases of each supported branch for this pair. Anything older on those branches is behind. PHP 8.1 and earlier are outside normal upstream support. CISA's instruction for systems you cannot update immediately, and for unsupported branches you continue to run, is to take the PHP-based systems offline until they are patched or upgraded. That sentence is the one legacy estates resist, and it is the sentence the catalog listing supports.
Vendor builds can carry different numbers. An operating-system package, a control-panel build, or a paid PHP distribution may backport the fix under its own version. The authoritative check is the vendor advisory that names these CVE numbers and the package you actually installed, not a blog's table alone. If the vendor has not shipped a build, CISA's guidance is to remove the service from the internet rather than to wait in place. Oracle, network vendors, and hosting panels have all had to map these CVEs into their own version schemes. "Our appliance is not a PHP server" is false when the management UI is PHP. Unit 42's October updates discussed exposure of management interfaces. If you operate a device whose admin page is a web app, it belongs on the same inventory as the marketing site.
The November 19 releases are the current supported point at the time of this post: 8.5.13, 8.4.28, 8.3.37, 8.2.36. They include the later fixes. A program that only scans for "not older than 8.2.35" will mark a host green while the November issues remain. Scan for the November build, or for the vendor package that documents both waves. Write the number down per host. "We run 8.3" is not an inventory.
Datadog's lab write-up says the two flaws are in the runtime's handling of requests, that application authentication does not get a chance to refuse the request, and that configuration changes circulating as a mitigation do not fully protect. CISA says a web application firewall may provide some protection until the update is in place. Use a firewall rule if you have one and you are scheduling a real upgrade this week. Do not record the firewall as the fix. The fix is the build number on the process that accepted the connection.
Where PHP hides in a company that "does not use PHP"
The CLI on a bastion is the version people paste into Slack. The version that matters is the one bound to port 443.
Containers often carry their own interpreter. A Dockerfile that starts FROM php:8.2 without a patch-level tag, or with a tag you built in September and never rebuilt, is an old runtime even when the host operating system is new. The image digest deployed to the cluster is the inventory row. The Dockerfile on the default branch may already have been edited by someone who intended to patch and did not ship.
Control panels, blog engines, analytics packages, and self-hosted CRMs bundle PHP. The admin guide says "runs on PHP" in a prerequisite list nobody re-reads. CISA's alert says prevalence may not be directly observable because PHP is a component of other software. Ask the owners of every public hostname what the origin process is. A hostname that redirects to a static bucket is fine. A hostname that still proxies to a forgotten WordPress, Magento, Laravel, or custom admin is a row.
Managed hosting can patch for you, or it can patch the platform PHP and leave the version you selected in a panel dropdown. Read the host's notice for these CVEs and confirm the site's selected version changed, then confirm with a page the host exposes or with the process list. A status email that says "we are protected" without a version is a prompt to ask for the version.
Serverless and PaaS builds are easy to forget because there is no machine to SSH into. The buildpack or the container the platform assembled last is still a version. Trigger a build log and read the PHP line. If the platform pins an old runtime until you edit a config file, edit the file. Waiting for a magic platform-wide bump is how your app stays on 8.1 while the vendor's marketing site moves on.
Internal admin tools count. A PHP app on a private network is a lower priority than the same app on the internet, and it is not a zero priority. CISA tells you to patch internet-facing systems first. The second wave is everything a compromised laptop, a VPN user, or a server-side request can reach. List it while you are listing the public hosts, and schedule it in the same month. A legacy billing admin that "only finance uses" is still PHP, and finance laptops are on the internet every evening.
What to do this week
- Make the inventory. Host, interface, how it is exposed, PHP version or the fact that you could not find it, owner, and whether it is internet-facing. Include containers, panels, and third-party software. A spreadsheet is enough. An empty row for "version unknown" is a finding, not a blank you skip.
- Patch internet-facing supported versions to at least the November 19 releases, through the package or image your vendor documents for these CVEs. Rebuild images. Redeploy. Confirm the running process, not the git diff. A successful pipeline that did not roll the pods has not patched production.
- Take PHP 8.1 and older off the internet if you cannot put a vendor's backported fix in place immediately. CISA is direct about this. A maintenance page on a static host is a better public face than an unsupported interpreter with a known-exploited flaw. Collect the exceptions in writing, with a date they end.
- If a host must stay up for a few days while you test the upgrade, put it behind the restriction you already have: source allow lists, the identity provider in front of the admin, and a WAF rule your vendor maps to these CVEs. Record the exception as temporary. Temporary without a date is permanent.
- Watch the runtime for signs CISA names: PHP worker processes launching shells or downloading tools, and other suspicious activity around the web processes. A worker that never needed a shell and now starts one is an incident even while you are mid-upgrade. Isolate, then investigate. Do not use the suspect host to reach your secret store.
- Rotate credentials that lived on hosts you could not prove were clean, especially if the host was internet-facing and unpatched after the October disclosure. Assume a known-exploited flaw on a public host may have been used. Database passwords, cloud keys on the instance role, and admin passwords stored in the app's config are the usual set. The order of rotation is the same as any other exposure: revoke, replace, then look at logs.
- Write the owner and the cadence. PHP releases security fixes more than once a quarter. A legacy app with no owner will miss the next one the way it missed October until a customer forwarded a headline. Name a person. Put the advisory RSS somewhere they look.
If the upgrade breaks the application, you have found the modernization backlog. Pin the compatibility failures in a list. Fix the ones that are config. Isolate the ones that are removed PHP features. The app can stay on a patched supported branch while you plan a rewrite. It should not stay on an unpatched branch because the rewrite is scheduled for next year. Those are different decisions, and teams merge them when they are tired.
What a legacy audit covers beyond the version number
The version stops the known-exploited hole. The rest of the audit stops the app from being an easy follow-up.
Configuration files and admin passwords in the web root, or in a repository the agent can read, are a second incident waiting beside a patched interpreter. Move secrets to the environment or a secret store. Confirm the store is not world-readable on the server. A patched PHP that still ships .env to anyone who can guess the path has not become a modern system. It has become a patched system with the same password problem.
Admin paths deserve the company's identity provider. Shared admin / admin logins on a PHP panel are how a patched CVE still loses the database. Turn off unused modules and sample apps the installer left behind. Old installers leave phpinfo pages and example scripts. Delete them. They are reconnaissance for anyone, automated or not.
Backups of the server include the code and often the secrets. Store them where the web server's role cannot read them, and test a restore. A ransomware operator or a destructive script does not need a novel PHP flaw if the only backup is on the same disk. The restore test is part of the audit because a legacy box is often the one nobody has restored since the employee who set it up left.
Dependencies inside the app, Composer packages and plugins, need a pass after the runtime is current. A patched interpreter does not patch a plugin the vendor abandoned. List plugins, remove the unused ones, and update the ones with a maintainer. If there is no maintainer and the plugin is required, that plugin is a reason to plan a replacement, recorded next to the version inventory.
The host operating system and the container base image are in scope. Teams upgrade PHP and leave the OS that contains a different critical flaw. One maintenance window can do both when you already have the courage to restart the service. Take the window. A second window in two weeks will be postponed.
Logging belongs to the same page. The web server log, the PHP error log, and the authentication log for the admin panel should land somewhere other than the server's local disk alone. Local disk logs disappear with the server. You will want them if you have to explain a week of exposure to a customer. CISA's detection note only helps if the process tree and the access log exist.
What does not hold
"We do not write PHP" does not hold when a dependency, a panel, or a marketing site runs it. The inventory is the answer. The slogan is not.
A WAF as a permanent control does not hold. CISA offers it as a bridge until the patch. Datadog's assessment of circulating configuration workarounds is that they do not fully protect. Bridges are for crossing. The far side is a patched build you verified.
Patching the CLI and not the FPM pool does not hold. The process that serves the site is the process that must restart on the new build. A rolling restart you did not finish is an old worker still taking requests. Check the workers after the deploy, not only the package manager.
Hiding the version banner does not hold. Removing X-Powered-By is tidy and it does not change the bytes of the interpreter. Attackers and researchers fingerprint more than the header. Spend the hour on the upgrade.
Waiting for the rewrite does not hold. A modernization project can be the right six-month plan and a terrible six-month exposure. Patch or unplug now. Rewrite on a schedule you can fund. SaaS development and a dedicated team are how the rewrite gets an owner. They are not a reason to leave 8.1 on a public port until the new stack is perfect.
"Nobody would bother with our site" does not hold for a flaw on CISA's known-exploited list. Automated scanning does not rank you by brand. It ranks you by banner and by response. The universities and appliances in this year's bulletins were reachable. Your brochure site is reachable. Reachable is the whole criterion.
An application penetration test that did not record the PHP version does not hold as evidence you are patched. Ask the tester for the build they observed, or read it yourself. A PDF full of low-severity header findings can coexist with an unpatched runtime the test never called out by CVE. Add the CVE to the scope if you rerun the test.
How modernization follows the patch, instead of blocking it
Once the public sites are on a supported, current build, decide what the legacy app still does that the business needs. Often it is a form, a catalog, or an integration that one customer still calls. Those are candidates for a small replacement with a clear owner. A full rewrite of a decade of plugins is a different project, and it starts after the dangerous interpreter is gone so you are not rebuilding on a deadline set by an exploit.
Keep a staging copy on the same major version you run in production, and upgrade staging first. Legacy PHP fails in specific extensions: old mysql calls, removed language features, a PECL module that has no build for the new minor. The staging failure is the work estimate. Production stays patched on the newest build that staging survived, and the incompatibility list becomes the modernization backlog with real line items.
Give the app a deployer who is not "whoever still remembers FileZilla." A git repository, a tagged image, and a one-step rollback are what make the next security release a Tuesday instead of a project. If the current deploy is a person copying files to a single server, the audit's recommendation is to change that path before the next CVE, not to write a new framework. Boring deploy tooling is the security control that makes patching possible.
Tell stakeholders the risk in one sentence they can repeat: this site runs PHP, the version was on a known-exploited list, it is now on this build, and these three features are scheduled for replacement. Stakeholders who hear only "we need to modernize" will defer. Stakeholders who hear a CVE and a date will fund the window. Use the specific number. It is more persuasive than a platform strategy, and it is accurate.
If the legacy app is the system of record for payments or health data, the patch is still step one, and the credential rotation in step 6 is not optional. Then talk about a design where that data lives behind a current stack with audit logs. Do the conversation in that order so the data is not sitting on an unpatched runtime while the architecture review runs long. Architecture reviews run long. Internet scanners do not wait for them.
The same discipline applies to the next runtime you adopt. A new service pinned to a container tag from last spring is the next legacy app. Put the November PHP release on the calendar as the reminder to check every other interpreter too. The teams that survive this class of headline are the teams that can answer, in a day, which version is running. Build that answer while the spreadsheet from step 1 is still open.
If this is your app, send the repo.
A 30-minute scope call. We read what is live, name what is dangerous, and quote a fixed scope.
How Techtribe audits a legacy PHP estate
We find the interpreters that actually serve traffic, compare them to the patched builds for these CVEs and to the November 19 release, and separate what can be upgraded this week from what has to come off the internet. You get the inventory, the version you are really running, and a short list of what broke or will break on the upgrade. Secrets sitting in the web root go on the same list as the version, because a patched server with a public config file is still an incident.
A one-time audit fits a company that has a handful of PHP hosts and wants them off the known-exploited list before the next scan. A Dedicated Team fits when those hosts are the product, the deploy path is a person with a password, and the modernization has to happen without stopping the business. SaaS development covers the replacement when a form or a workflow should not stay on the old app after it is safe enough to plan.
Bring the hostnames, the hosting panel login if that is where the version is chosen, and anyone who still knows how the app is deployed. If you do not know the version, that is a normal place to start. On the scope call we will rather spend the time finding the FPM pool than talking about a rewrite you may not need yet. If the app is public and unpatched, say that first so we begin with taking it offline or upgrading it, not with a roadmap.
The fixed scope for taking a generated app to production is a page per tool: Lovable, Bolt, v0, and Replit.
Questions
What is PHP2Shell?
It is the name used for two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619. CISA says they allow unauthenticated remote code execution in PHP installations that serve web requests, and added both to the Known Exploited Vulnerabilities catalog on October 26, 2026. The fix is a patched PHP version, not an application change.
Which versions are fixed?
CISA's alert tells organizations to update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35 for these two flaws. On November 19, 2026 PHP shipped a further security release, 8.5.13, 8.4.28, 8.3.37, and 8.2.36, covering additional flaws. Being on the October fix and ignoring the November release is still behind.
Does our application firewall or a php.ini change replace the upgrade?
CISA says a web application firewall may provide some protection until you patch, and that systems you cannot patch, including PHP 8.1 and earlier, should be taken off the internet until they are updated. Datadog has said community configuration toggles do not fully protect against these flaws. Plan on the upgrade.
The CLI says we are patched. Are we done?
Not until you have checked the PHP that answers HTTP. Containers, control panels, and vendor appliances often bundle a different interpreter from the one on your shell path. CISA also warns that PHP hides inside other software. Inventory the runtime that serves the request.