Key points
- The PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619) are patched in PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12.
- PHP 7.x, 8.0, and 8.1 do not receive patches: you must migrate to PHP 8.3 or newer.
- On shared hosting, ask your host to confirm that the patches are installed on your site's server.
- Our free security test reads the PHP version reported by your site and tells you whether it has been patched.
Check your site for free
PHP version, signs of infection, Google’s blocklist, exposed files: the result in under 30 seconds, no sign-up.
Two days, two critical vulnerabilities and a series of updates: here is the summary of the “PHP2Shell” affair, what it means for a WordPress site, and the list of steps to take in order.
What happened
- October 20, 2026: information regarding two critical PHP vulnerabilities circulates ahead of schedule. The PHP team brings forward the release of their patches.
- October 21, 2026: the patches are released. The official advisory urges upgrading immediately to PHP 8.2.35, 8.3.36, 8.4.27, or 8.5.12, depending on the branch in use.
- The vulnerabilities are tracked under CVE-2026-109618 and CVE-2026-109619. According to Aikido, which released a verification tool, they stem from form field names nested in a specific way that causes PHP to consume excessive memory while reading the request.
- PHP 7.x, 8.0, and 8.1 do not receive patches: these versions are no longer supported.
Steps to take, in order
- Check your PHP version: in WordPress, go to Tools › Site Health › Info › Server, under the “PHP version” line.
- Upgrade to the patched version of your branch: 8.2.35, 8.3.36, 8.4.27, or 8.5.12. If your site is still running 7.x, 8.0, or 8.1, migrate to PHP 8.3 or newer, usually from your host’s control panel.
- Confirm with your host: on shared or managed hosting, the host installs the patches. A released update is not necessarily already installed on your site’s server: ask them to confirm.
- Meanwhile, a risk-free precaution: in the site’s
.user.inifile, addsession.upload_progress.enabled = Off. This setting prevents PHP from writing text chosen by the visitor to the server during a file upload, a trick often used to turn a vulnerability into a takeover. It does not fix the vulnerability. WordPress does not use this feature: turning it off causes no issues. The complete file we recommend is explained below. - Test again: recheck the version in Site Health once the update is done, or run the online test below on your site.
The recommended .user.ini file
On most hosting providers, a .user.ini file at the root of the site configures PHP for this site only. Here are the lines we recommend; none of them interfere with WordPress, WooCommerce, or nexya:
; Manual measure following the PHP vulnerabilities of 10.21.2026
session.upload_progress.enabled = Off
; Hardening
display_errors = Off
log_errors = On
session.use_strict_mode = 1
session.cookie_httponly = 1
session.upload_progress.enabled = Off: PHP no longer writes the text sent by the visitor during a file upload into a session file. An attacker thus loses a simple way to drop their own code onto the server, often used to exploit a PHP vulnerability.display_errors = Off: PHP errors are no longer displayed on the screen. Server paths and code snippets they might show will no longer give information to an attacker.log_errors = On: these errors remain written in the server log so you can read them.session.use_strict_mode = 1: PHP rejects session IDs invented by the visitor, which prevents preparing a session in advance to steal it later.session.cookie_httponly = 1: the PHP session cookie is no longer readable by JavaScript. A script injected into a page can therefore not steal it.
PHP rereads this file after a few minutes. If it already exists, for example for Wordfence, add these lines to the end without touching the rest. None of these lines replace the patched version of PHP: they only reduce what an attacker can do.
Test your site online
Our free WordPress security test looks at your site like a visitor would: it reads up to 15 pages and checks all sitemap addresses (up to 5,000), without sending anything other than normal requests. Here is what it checks:
- The PHP version: if the server announces it, the test tells you if it has the patches from October 21st, if it is too old to receive them, or if it is invisible from the outside.
- Visible signs of an infection: hidden spam links (pharma, casino, etc.), injected Japanese text, cloaked JavaScript typical of malware, invisible frames pointing to another site, redirects to another domain, and mass-created spam pages in the sitemap.
- Google’s blacklist: is the site flagged by Google Safe Browsing as dangerous or deceptive?
- Exposed files: .git folder, debug.log, media folder listing, readme.html.
- Information leaks: visible user account list, displayed WordPress version, open XML-RPC.
- HTTP security headers, the transition to HTTPS, and trackers loaded before consent.
What the test cannot do: prove that a site is clean. A hacker can hide without showing anything to visitors. If the test finds nothing, also check from the inside: Wordfence scan, comparison of WordPress files with the originals (wp core verify-checksums), and list of administrator accounts.
Check your site for free
PHP version, signs of infection, Google’s blocklist, exposed files: the result in under 30 seconds, no sign-up.
What nexya does for you
As of version 1.5.10, the nexya Security module displays an alert when the server’s PHP version is no longer supported or will soon reach end-of-life, along with the version you should upgrade to. Its lightweight firewall blocks common attacks before WordPress starts, but no plugin can block a vulnerability in PHP itself: true protection relies on keeping PHP up to date.
For details on the vulnerabilities and instructions, also read our article Critical PHP vulnerabilities (PHP2Shell): what to do on your WordPress site.
FAQ
How do I know if my site is protected?
Check the PHP version in Tools › Site Health › Info › Server: it must be at least 8.2.35, 8.3.36, 8.4.27, or 8.5.12 depending on the branch. Our online test also reads it when the server reports it.
Can the online test damage my site?
No. It only reads what the site displays to everyone, just like a visitor: no attack requests are sent.
Is the line session.upload_progress.enabled = Off enough?
No. It closes a method often used to exploit a PHP vulnerability, but it does not fix the vulnerability. The true protection is the patched version of PHP.
Does the test tell me if my site is infected?
It spots visible signs of the most common hacks: hidden spam, disguised scripts, invisible frames, redirections, and Google's blacklist. It cannot prove that a site is clean: also check from the inside with a Wordfence scan and by comparing WordPress files.
The modules in this post
Try nexya Pro free for 7 days
Every module, forms, newsletters and the page cache, on your site. No commitment.