Case Files
P1Security vulnerabilityPHP2Shell

PHP2Shell: Early flagged the defect in the change that introduced it.

Early flagged the PHP2Shell memory-lifetime defect and a separate initialization bug in a replay of the January 2025 change. In a follow-up on the vulnerable revision, Early created a Fix PR for the backtrace defect.

What changed

A later error could access freed request memory.

Request memory is freed but the worker retains a backtrace reference that a later request can consume.
The analysis run

3 findings surfaced for action.

Early analyzed the January 2025 Zend change and flagged the backtrace defect alongside two other actionable findings.

Early product findings list showing the PHP2Shell backtrace defect alongside other PHP Zend findings.
Later product view; the five visible rows differ from the original seven-finding run.
The PHP2Shell finding

Early flagged the memory defect.

Early verdict · BUG

“Backtrace global not cleared on fast shutdown”

Early pointed engineers to the shutdown cleanup path and the stale reference it left behind. Fast shutdown could free the request’s memory while the backtrace global still pointed to it. An early error in a later request could reach that freed memory.

Actual Early finding for the fast-shutdown backtrace defect, currently shown as BUG and P1 Security.
Individual finding shown in a later product capture. P1 Security is the updated classification, not the original investigation result.

From finding to Fix PR

Early created a Fix PR that clears the stale backtrace reference during shutdown.

Early’s Create a fix Pull Request wizard showing the backtrace finding classified as P1 Security.
Creating a Fix PR from the PHP2Shell finding.
ZVAL_UNDEF(&EG(last_fatal_error_backtrace));

Compilation/runtime verification pending · No new test added