Skip to content
Exploited OpenSSH flaw CVE-2026-123158 lets long passwords bypass sign-in on musl Linux
Black Shard

Loading

    AdvisoriesCritical severity

    PHP2Shell: the critical PHP vulnerability and how to patch it

    Two critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, let a crafted web request with no login run code on the server. Fixed releases shipped on 22 October 2026, Brisbane time. Updating WordPress, Drupal, Joomla or Magento does not fix it.

    Black Shard Advisories

    Updated 7 min read

    Share

    Affects

    PHP

    What to do

    Update PHP itself to a fixed release, rebuild images that bundle it, and restart every PHP worker.

    On this page
    1. What is the PHP2Shell vulnerability?
    2. Which PHP sites are exposed, and how do you check?
    3. Which PHP version fixes PHP2Shell?
    4. What can you do while a patch waits?
    5. How do you tell whether someone already got in?
    6. How Black Shard fixes PHP2Shell
    7. How to engage Black Shard
    Advisory BS-ADV-2026-0001
    Disclosed
    CVEs
    CVE-2026-109618CVE-2026-109619
    CVSS
    9.8 (v3.1, NVD, CVE-2026-109618)8.1 (v3.1, NVD, CVE-2026-109619)9.2 (v4.0, PHP security team, both CVEs)
    Exploitation
    Public exploit code
    Affected
    • PHP 8.5 before 8.5.12
    • 8.4 before 8.4.27
    • 8.3 before 8.3.36
    • 8.2 before 8.2.35
    • 8.1 and earlier, unsupported
    Fixed in
    • 8.5.12
    • 8.4.27
    • 8.3.36
    • 8.2.35

    What is the PHP2Shell vulnerability?

    Black Shard's advice to Australian organisations running PHP: update PHP itself to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install the distribution's patched package, then rebuild images and restart every PHP worker. ASD's ACSC has issued a critical alert, and the Essential Eight patch window for a critical flaw in an internet-facing service is 48 hours.

    PHP2Shell is the name for two critical flaws in PHP, the language behind WordPress, Drupal, Joomla, Magento and Laravel. One crafted web request, sent without a username or password, can let an attacker run commands on the server as the account PHP runs under. It can also let them read the server's working memory, which can hold database passwords, session tokens, API keys and certificates.

    CVE-2026-109618 is memory corruption in the way PHP handles running out of memory while it processes a request. CVE-2026-109619 is a use-after-free: state left behind by one request is reused by a later request on the same worker. The PHP security team rates both 9.2 under CVSS v4.0. Under CVSS 3.1, NVD rates CVE-2026-109618 9.8 and CVE-2026-109619 8.1. Both are reachable over the network with no authentication.

    The PHP project published fixed releases on 21 October 2026 at 14:00 UTC, which was midnight on 22 October in Brisbane. The release came a day early after the CVE identifiers leaked on 20 October. The php.net announcement and the two GitHub security advisories, GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp, carry the technical detail.

    Which PHP sites are exposed, and how do you check?

    Every PHP installation that serves web requests is affected: Apache mod_php, PHP-FPM, php-cgi, FrankenPHP and LiteSpeed, on Linux and Windows. All supported PHP branches are affected, and older unsupported versions should be treated as vulnerable. ASD's ACSC states that all PHP versions from PHP 5 onwards may be affected. That includes PHP bundled inside container images, appliances and hosting control panels.

    Apache with mod_php carries the highest risk, because an unauthenticated request can reach code execution before any application code runs. The PHP Foundation has also confirmed code execution on PHP-FPM through application code paths, so treat FPM sites as affected. Researchers demonstrated the attack against current WordPress, Drupal and Joomla installs. On a server you control, the check takes a few minutes.

    • Run php -v on each server, then confirm the version each PHP-FPM pool or Apache module loads.
    • Compare it with the fixed releases: 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
    • On Debian, Ubuntu or Red Hat packages, search the package changelog for CVE-2026-109618. Distribution backports keep the old version number.
    • In cPanel, Plesk or another hosting panel, check the PHP version set for each site as well as the server default.
    • List container images and appliances that ship PHP, and check each vendor's advisory.
    • On shared or managed hosting, ask the provider which PHP build each site runs and when it was patched.

    Which PHP version fixes PHP2Shell?

    Update PHP to a fixed release, or install your distribution's patched package. Then rebuild every container image that includes PHP and restart every PHP worker, because a running process keeps the old code in memory. Patching is the only complete fix.

    CISA and the UK NCSC advise taking PHP systems offline if they cannot be patched or mitigated quickly. CISA gives the same advice for any system on PHP 8.1 or earlier. PHP 8.2 reaches end of life on 31 December 2026, so a site patched to 8.2.35 needs an upgrade plan as well.

    • PHP branch: 8.5

      Fixed release
      8.5.12
      Notes
      On 8.5, also set fatal_error_backtraces=0 until the update is in
    • PHP branch: 8.4

      Fixed release
      8.4.27
      Notes
      Official release
    • PHP branch: 8.3

      Fixed release
      8.3.36
      Notes
      Official release
    • PHP branch: 8.2

      Fixed release
      8.2.35
      Notes
      End of life 31 December 2026
    • PHP branch: 8.1 and earlier

      Fixed release
      No official release
      Notes
      Source backports exist for 7.4, 8.0 and 8.1, and some distributions and LTS vendors ship patched packages. Plan the upgrade.
    Fixed releases published by the PHP project on 21 October 2026 at 14:00 UTC.

    What can you do while a patch waits?

    If the update has to wait for a change window or a hosting provider, these settings from the PHP advisories reduce the exposure. They are partial measures. Restart every PHP worker after each change, or it has no effect. The Canadian Centre for Cyber Security also lists a related flaw, CVE-2026-115560, with no fixed release yet, and the session.upload_progress setting is the interim measure for it.

    Web application firewall rules from Cloudflare and other providers also give partial protection. They do nothing for traffic that reaches the origin server directly, so the origin should accept web traffic only from the firewall.

    • Set memory_limit=-1 administratively, in php.ini or the pool configuration, so applications cannot override it.
    • Set post_max_size to 8M, or 32M where uploads are needed, and keep upload_max_filesize smaller than post_max_size.
    • Set request size, field, part and header limits at the web server or proxy.
    • Block multipart requests at the web server where the site does not use them.
    • Set session.upload_progress.enabled=0 in php.ini or the pool configuration. ini_set and .user.ini do not apply it.
    • Do not use RLIMIT_AS or RLIMIT_DATA limits as a workaround.

    How do you tell whether someone already got in?

    Several security vendors have recorded exploitation attempts, the earliest in a honeypot on 17 October. Neither CVE is in the CISA Known Exploited Vulnerabilities catalog as of its 23 October release. CISA had not observed exploitation when it published its alert, and ASD's ACSC is not aware of successful active exploitation within Australia. No public indicators of compromise exist yet.

    Review web server and PHP logs from 17 October onwards for unusual uploads, odd session cookies and unexplained worker restarts. Proof-of-concept code circulating online is unverified and may carry malware, so do not run it to test a server. Clean application logs do not prove a server is safe.

    • Unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses
    • Oversized or malformed PHPSESSID cookies
    • PHP worker restarts with no known cause
    • Commands run by the web server account that it has no reason to run
    • New or modified PHP files in the web root

    How Black Shard fixes PHP2Shell

    Black Shard runs the fix as one fixed-scope engagement, from finding every PHP runtime to confirming the patch held. Where there are signs of compromise, containment comes first and the work follows our incident response process.

    The Essential Eight patch applications strategy sets a 48-hour window for internet-facing services when the vendor rates a flaw critical or a working exploit exists, and PHP2Shell is rated critical. A patched, verified and logged fix is evidence for that strategy in an Essential Eight assessment. Black Shard's own estate: Essential Eight Maturity Level 3, assessed September 2026.

    • Exposure check: internet-facing hosts scanned from outside, and every PHP runtime, pool, container image and panel listed
    • Patching: fixed releases or vendor packages installed, images rebuilt and every worker restarted in an agreed window
    • Hardening: interim PHP and web server limits where a patch has to wait, and origins locked behind the firewall
    • Verification: each host re-checked after the change, with version, package changelog and running workers recorded
    • Log review: web and PHP logs from 17 October checked for the signs of exploitation
    • Monitoring: scheduled external scans, so a new or forgotten PHP host is found and patched

    How to engage Black Shard

    Book a free 30-minute scoping call, or send a brief through the contact form or to info@blackshard.com.au naming the sites, servers and hosting providers involved. The call produces a fixed-scope quote covering the exposure check, patching, hardening, verification and log review, with scope and price agreed in writing before work starts.

    If a server shows signs of compromise, call the 24/7 incident line on 1800 370 270. Treat the server as compromised and rotate every credential and key it held. Memory disclosure may expose personal information, so plan for an assessment under the Notifiable Data Breaches scheme, which Black Shard supports with a factual incident record. Report incidents to ASD's ACSC on 1300 CYBER1 (1300 292 371).

    For sites that need a standing owner afterwards, attack surface management keeps internet-facing hosts on scheduled scans, and managed hosting runs applications on dedicated infrastructure that is patched, backed up, monitored and reported on every month.

    Sources

    1. PrimaryCanadian Centre for Cyber Security, AL26-026 Critical vulnerabilities impacting PHP (update 1, 23 October 2026)Retrieved 25 Oct 2026
    2. PrimaryCISA, Critical vulnerabilities in PHP require immediate patchingRetrieved 25 Oct 2026
    3. PrimaryASD's ACSC, Critical vulnerabilities in PHPRetrieved 25 Oct 2026
    4. PrimaryThe PHP Foundation, Today's PHP security releaseRetrieved 25 Oct 2026
    5. PrimaryNVD, CVE-2026-109618Retrieved 25 Oct 2026
    6. PrimaryNVD, CVE-2026-109619Retrieved 25 Oct 2026
    7. PrimaryCISA, Known Exploited Vulnerabilities Catalog (release 2026.10.23)Retrieved 25 Oct 2026

    Updates

    1. Corrected the NVD score for CVE-2026-109619 to 8.1 under CVSS 3.1. NVD rates CVE-2026-109618 9.8. Neither CVE is in the CISA Known Exploited Vulnerabilities Catalog at its 23 October release.
    2. Added CVE-2026-115560, which the Canadian Centre for Cyber Security added to its PHP alert on 23 October. It has no fixed release yet. The PHP security team recommends session.upload_progress.enabled=0 in the meantime.

    Further reading

    Where this shows up in our work

    Affected by this advisory?

    Tell us what you run. We patch, contain and check for signs of compromise.