Overlapping data layers illustrate an interrupted PHP session write in the phpAfterShell vulnerability.

phpAfterShell vulnerability and how to assess PHP exposure

Key takeaways

  • SecurityWeek reported that PHP fixed CVE-2026-126714 on November 19, 2026, and gave the vulnerability a CVSS score of 9.2.
  • The flaw affects file-backed session updates and can lead to remote code execution when several conditions align.
  • Session upload progress is one exposure factor, and application code that stores large user-controlled values in sessions also warrants review.
  • Check the PHP version and session handler used by each deployed application, then verify the update in the runtime that serves web requests.

The phpAfterShell vulnerability, tracked as CVE-2026-126714, is a critical PHP session-handling flaw that can lead to remote code execution under certain conditions. Maintainers should check the PHP version and session handler used by each deployed application, prioritize updates for those using file-backed sessions, and review how user input reaches session storage.

SecurityWeek reported that PHP fixed the flaw on November 19, 2026, alongside six other critical issues. The outlet reported a CVSS score of 9.2 and said there appeared to be no reports of exploitation in the wild at the time of publication. The account draws on findings from security firm Depthfirst and PHP’s advisory. SecurityWeek’s phpAfterShell reporting

For a PHP maintainer, exposure is a deployment question. The PHP release running the application, its effective session settings, and the data the application puts into sessions can vary across environments. Start with what the application actually uses in production and use the code review to decide where to focus follow-up work.

What is the phpAfterShell vulnerability?

A server-side session stores application state across requests. An application might use it to remember a signed-in user or hold temporary information while someone completes a multi-step form. With file-backed sessions, PHP stores that state in a file and reads it back when the application resumes the session. PHP session documentation

According to SecurityWeek’s account of Depthfirst’s findings, the vulnerability came from how PHP updated that file. PHP began overwriting the existing contents and removed any leftover data afterward. An interrupted write could leave a mixture of fresh session data and remnants of an older session, which PHP could later interpret as legitimate state.

Deserialization is the process of turning stored data back into values or objects a program can use. In the scenario SecurityWeek described, a corrupted session could trigger object deserialization. Remote code execution would further depend on whether the application had a path from deserializing those objects to running code. That distinction matters when assessing the potential impact on an individual deployment. OWASP guidance on deserialization

How does phpAfterShell relate to PHP2Shell?

SecurityWeek reported that PHP2Shell involved PHP’s session upload-progress callback, which could open and decode a file-backed session before the application script began. The earlier fix restricted which objects PHP could create during that operation. The underlying file update behavior persisted, and Depthfirst identified it as the source of phpAfterShell.

There is a practical lesson for reviewers. When a fix strengthens how an application reads or interprets state, review how the application writes that state and what it may read back after an interrupted operation. A regression check for the original problem can pass while a separate failure mode remains in the same subsystem. An inventory that records which component and release received each fix makes those follow-up reviews easier. InnoVirtuoso’s coverage of a flaw in GitHub dependency resolution

Which PHP applications should you check first?

Start with internet-facing applications that use PHP’s default file-backed session storage and run a release below the reported fix for their branch. Confirm the session handler for the application’s web runtime. If your team maintains several services, group them by the runtime or image that serves them and record any application-specific configuration overrides.

Put deployments with session upload progress enabled near the front of the review. SecurityWeek reported that upload progress was one way a remote client could influence data stored in a session. The outlet also relayed PHP’s advisory that the underlying issue can arise when an application stores large user-controlled strings in a session. An exposure review should therefore cover both the PHP setting and application code that writes session data. PHP session configuration reference

PHP’s advisory, as described by SecurityWeek, also identified a possible interruption scenario in threaded builds. Treat runtime details as evidence you can gather alongside the patch rollout. You can establish the installed version and storage handler without trying to reproduce corrupted state. For work that spans several owners, record which services need patching, who owns each one, and how the team will verify the result. InnoVirtuoso’s guide to assessing and responding to a high-severity vulnerability

Which PHP releases contain the fix?

SecurityWeek listed the following releases as containing the phpAfterShell patch. Use the row for the branch you deploy as a reference when reviewing your package or runtime image. The table reflects the releases identified in the November 2026 report. PHP release downloads

PHP branch Release listed with the fix
8.6 8.6.0
8.5 8.5.13
8.4 8.4.28
8.3 8.3.37
8.2 8.2.36

Check the deployed build after your rollout. For example, an updated command-line PHP installation can tell you what a maintenance shell uses, while the application may still receive requests through workers running a different build. If you deploy a runtime image, confirm the updated image is serving traffic across the fleet. Where a provider supplies patched packages, use its release information to confirm whether the deployed build includes the fix.

How to patch PHP and review session handling

  1. Inventory applications and runtimes. Record the PHP build, session handler, and responsible team for each live service. Include legacy applications and deployments that build their own runtime images. When one base image serves several applications, list which of them have received a rebuilt and redeployed image.
  2. Update the runtime. Roll out a build that includes the fix and replace or reload the application workers as appropriate for your deployment. Use service-level verification to check the running build across instances, including instances brought up from the image or package your deployment will use next time.
  3. Test normal session behavior. In staging, exercise sign-in, sign-out, and workflows that keep temporary state across requests. If the application supports uploads, check that a typical upload and any progress display still work. These checks confirm that ordinary application behavior survived the runtime update.
  4. Review what goes into sessions. Identify code that copies request data into session state and ask what needs to persist across requests. For example, a multi-step form may need a server-managed reference to a draft. Review whether the session also needs to carry the full submitted text, and check where the application enforces size limits.
  5. Confirm whether upload progress is needed. Ask which workflows depend on PHP’s session upload-progress feature before changing its configuration. If you choose to disable an unused feature, test the affected upload flows and keep the runtime fix in the rollout plan. Application-written session data remains part of the review.

Keep the verification criteria close to the deployment ticket so someone can repeat the checks in another environment. A record that says which web runtime was checked and which workflows passed is easier to use during a later incident than a broad note that the server was updated. NIST enterprise patch management guidance

The Bottom Line

The phpAfterShell vulnerability makes the deployed PHP build and the effective session handler the first facts to establish. Check both for your highest-priority application today. Then assign the patch rollout to an owner and make verification in the web runtime part of the completion criteria.

Once the fixed build is serving traffic, document which workflows rely on session upload progress and where the application stores user-controlled values in sessions. That gives the next maintainer a concrete starting point when a PHP advisory touches the same part of the application. InnoVirtuoso’s coverage of vulnerability response during the Ubuntu disruption

Frequently Asked Questions

What is phpAfterShell in PHP?

PhpAfterShell is the name of CVE-2026-126714, a critical vulnerability in how PHP updates file-backed sessions. An interrupted update can leave corrupted state that PHP may later deserialize, potentially leading to remote code execution under certain conditions.

Which PHP versions fix phpAfterShell?

SecurityWeek identified PHP 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36 as releases containing the fix. Verify the build that actually serves your application’s web requests.

Does disabling PHP session upload progress fix phpAfterShell?

Disabling session upload progress addresses one reported way a client can influence session data. Apply the PHP fix and review application code that writes user-controlled values into sessions.

How is phpAfterShell related to PHP2Shell?

Both issues involve behavior around file-backed sessions and PHP’s upload-progress handling. The PHP2Shell fix restricted which objects PHP could create, and phpAfterShell exposed a separate weakness in how PHP updated the session file.

Has phpAfterShell been exploited in the wild?

SecurityWeek said there appeared to be no reports of in-the-wild exploitation when it published its November 23, 2026 coverage. Maintainers can use the deployed PHP build and session configuration to prioritize updates.

Sources

Enjoyed this? Subscribe to the InnoVirtuoso newsletter for practical AI, security and tech insights — and share your thoughts in the comments.

Browse InnoVirtuoso for more!