ALPINE-CVE-2026-129481: Use After Free
Use-after-free after interrupted session shutdown.
The session extension records the filename of the executing script when a session starts. If a fatal error occurs in an application callback while the session variables are destroyed at shutdown, such as streamclose() of a user-defined stream wrapper, the pointer is retained after the request memory is freed, and a later request handled by the same worker can free the stale string. An attacker who can trigger such a failing cleanup may crash the worker or corrupt memory; code execution has not been demonstrated. This requires the filename to be allocated in request memory, for example when the script is not cached by OPcache.
This issue affects PHP versions 8.3. before 8.3.37, 8.4. before 8.4.28 and 8.5. before 8.5.13.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/php83to a version that resolves this vulnerability.Fixed in 8.3.37-r0 - Upgrade
Upgrade
alpine/php84to a version that resolves this vulnerability.Fixed in 8.4.28-r0 - Upgrade
Upgrade
alpine/php85to a version that resolves this vulnerability.Fixed in 8.5.13-r0 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 8.5.13
Event History
Frequently Asked Questions
Which deployments are most exposed to this issue?
Deployments using the affected PHP 8.3, 8.4, or 8.5 versions are exposed when a request can trigger a fatal error during session-variable cleanup and the executing script filename is allocated in request memory. Scripts not cached by OPcache are an example of the required request-memory allocation condition.
What does an attacker need to do to exploit it?
An attacker must be able to trigger a failing cleanup during session shutdown, such as a fatal error in an application callback like stream_close() for a user-defined stream wrapper. A later request must then be handled by the same worker, which can free the retained stale pointer.
Is code execution confirmed?
No. The available information states that an attacker may crash the worker or corrupt memory, but code execution has not been demonstrated.
What versions contain fixes?
The issue affects PHP 8.3 releases before 8.3.37, PHP 8.4 releases before 8.4.28, and PHP 8.5 releases before 8.5.13. Update the applicable Alpine PHP package to a version at or beyond the listed fixed release.