Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach FrankenPHP app calling putenv() in shutdown
-
ExploitTrigger request that frees environment sandbox
-
ExecutionDangling thread-local pointer survives shutdown
-
ImpactNext request's getenv()/putenv() crashes process or leaks prior env
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the deployed PHP application to call putenv() during request shutdown - specifically from a registered shutdown function, the destructor of an object still alive at end of script, or a session write()/close() handler; without such application code the vulnerable path is never reached. Classic mode is affected on every thread, while worker mode is only affected when a worker script restarts. The outcome is deployment-dependent: on a default PHP 8.5 release build with the default allocator the next request crashes the whole process (segfault/DoS), whereas reading back the previous request's environment value requires the non-default USE_ZEND_ALLOC=0 allocator. Although CVSS PR:N denotes an unauthenticated network vector, realistic reachability is limited by this application-coding prerequisite and the need for a follow-up request on the same PHP thread, reflected in AC:H/AT:P. The only complete fix is updating to FrankenPHP 1.13.4; the vendor workaround is to avoid calling putenv() from shutdown functions, destructors, or session handlers. |
| Impact | This is a genuine but conditional reliability/information-disclosure issue rather than a mass-exploitable remote code execution flaw. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 8.3, driven mainly by VA:H (process crash / denial of service) with only VC:L (limited confidentiality via environment-value leakage) and VI:N. The high attack complexity (AC:H) and present attack requirement (AT:P) are consistent with the mechanism: the vulnerable code path only exists when the deployed PHP application itself calls putenv() during request shutdown (a shutdown function, a destructor of an object alive at script end, or a session write()/close() handler), and the attacker must then cause a subsequent request on the same PHP thread. No EPSS score and no KEV listing are provided, and there is no indication of active exploitation - the vuln.today decision label is 'this_week', not act_now/emergency, consistent with a patch-promptly posture rather than drop-everything urgency. The GHSA advisory includes a conceptual proof-of-concept, but the input does not mark it as confirmed working exploit code, so it should be treated as a public PoC reference, not weaponized exploitation. Net: prioritize patching, but this is weighted toward availability impact against FrankenPHP deployments whose application code happens to use putenv() in shutdown paths, not a universally reachable default-config RCE. |
| Exploit ScenarioDerived | A FrankenPHP-hosted application registers a shutdown function, destructor, or session handler that calls putenv(); an attacker sends a request that executes this path, leaving a dangling pointer to the freed environment sandbox, then sends a second request on the same PHP thread whose first getenv()/putenv() (which most frameworks call every request) dereferences freed memory. On a default PHP 8.5 release build this segfaults the whole process (denial of service); with the non-default USE_ZEND_ALLOC=0 allocator the follow-up request can instead read back the previous request's environment value. A conceptual PoC (register_shutdown_function(fn () => putenv('LATE=1')) then getenv('LATE')) is published in the GHSA advisory, but it is not verified as working exploit code in the available data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
A use-after-free in FrankenPHP releases before 1.13.4 leaves a dangling thread-local pointer to a freed environment sandbox whenever an application calls putenv() from code that runs during request shutdown - a registered shutdown function, a destructor of an object still alive at end of script, or a session write()/close() handler. The next script handled on the same PHP thread dereferences that freed table on its first getenv() or putenv() call, which crashes the entire process on a default PHP 8.5 release build (segfault/denial of service) or, with the non-default USE_ZEND_ALLOC=0 allocator, lets a later request read back the previous request's environment value. The flaw is reachable by unauthenticated remote requests (CVSS v4.0 8.3) but is conditional: it requires the deployed application to perform such a shutdown-time putenv() and a follow-up request on the same thread, which is reflected in the AC:H/AT:P assessment; exploitation is not confirmed in CISA KEV and no working exploit has been verified, although the vendor advisory publishes a proof-of-concept snippet.
RemediationAI
Vendor-released patch: upgrade to FrankenPHP 1.13.4, which clears the thread-local sandboxed_env pointer after php_request_shutdown() returns (fix commit https://github.com/php/frankenphp/commit/ab174aa6c27738b9ee56c97ac276d152bfb38f5e; advisory https://github.com/php/frankenphp/security/advisories/GHSA-rgpj-f2qx-xwhf). Go deployments should bump go/github.com/dunglas/frankenphp to 1.13.4 or later. The vendor states the only complete fix is updating; the documented workaround, to be used only until an upgrade can be scheduled, is to stop calling putenv() from shutdown functions, destructors of objects alive at end of script, and session write()/close() handlers - this removes the dangling-pointer allocation path but requires auditing and changing application code (including third-party framework or session-handler code you may not control), and leaves no protection if any such call remains. Because the defect also depends on a follow-up request landing on the same PHP thread, reducing per-thread lifetime or request volume is not a substitute for the patch. Given the this_week priority, the upgrade to 1.13.4 should be scheduled in the current patch cycle.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FrankenPHP embeds the PHP interpreter inside a Go HTTP server, running PHP scripts on per-thread interpreter instances driven by a C-level php_thread loop. FrankenPHP maintains a thread-local environment sandbox (sandboxed_env): the first putenv() call in a script allocates the sandbox on the request heap. The bug is an ordering error in the request lifecycle - FrankenPHP released that sandbox before calling php_request_shutdown(), but shutdown functions, object destructors and session write()/close() handlers all execute inside php_request_shutdown(), so a putenv() issued from any of those contexts allocates a fresh sandbox that php_request_shutdown() then frees together with the rest of the request heap, leaving the thread-local pointer dangling. This is a classic CWE-416 use-after-free: the next script scheduled on the same thread touches the freed environment table on its first getenv()/putenv(), which most PHP frameworks do on every request. The commit ab174aa6c27738b9ee56c97ac276d152bfb38f5e fixes it by explicitly setting sandboxed_env to NULL once php_request_shutdown() returns, and adds a regression test (TestPutenvInShutdownFunction) plus a testdata fixture exercising a shutdown-registered putenv(). Exposure differs by deployment mode: classic mode is affected on every thread, whereas worker mode is only affected when a worker script restarts. The observable outcome also depends on build configuration - a segmentation fault with PHP's default allocator on a release build versus cross-request environment disclosure when USE_ZEND_ALLOC=0 is set; the precise application-side trigger (which shutdown hook runs putenv()) is described by the vendor, but the vulnerability is never reached by applications that do not call putenv() during shutdown.
Know when Frankenphp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
AV:N as requests are remote; AC:H because exploitation needs app-specific putenv()-in-shutdown code plus a same-thread follow-up request; PR:N/UI:N per reachable request flow; C:L (env leak only under non-default allocator), A:H (process crash).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
FrankenPHP before 1.13.4 contains a use-after-free vulnerability that leaves a dangling pointer to a freed environment table when putenv() is called during request shutdown. Attackers triggering putenv() in shutdown functions, destructors, or session handlers can crash the process on the next getenv() call or leak previous request environment values.
Technical POC Analysis
CWE-416 (use-after-free) in FrankenPHP's embedded PHP runtime, not in a PHP script or extension.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A use-after-free vulnerability in FrankenPHP versions prior to 1.13.4 can crash the entire server process or, under non-default configurations, leak environment data between requests. Exploitation requires a specific application pattern (shutdown-time putenv) and a follow-up request on the same thread; while no active exploitation is confirmed, the risk of service disruption and potential data exposure is significant for affected deployments. Leadership should prioritize patching to avoid operational outages and protect sensitive environment information.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Frankenphp
View allCGI path splitting vulnerability in FrankenPHP before 1.11.2 — Unicode characters bypass path validation during CGI proc
FrankenPHP versions prior to 1.11.2 fail to properly isolate session data between worker requests, enabling cross-user s
FrankenPHP Docker images before 1.1.11 were built only when an upstream base-image tag was created, so when Alpine, PHP,
FrankenPHP standalone static binaries 1.8.0 through 1.13.1 can be crashed by a single unauthenticated request when appli
An authentication bypass in FrankenPHP before 1.13.0 lets unauthenticated remote attackers spoof any trusted dash-form r
Use-after-free in FrankenPHP worker mode (versions up to and including 1.13.3) lets remote clients trigger reads of free
FrankenPHP releases before 1.13.0 abort the entire server process - every vhost, worker and in-flight request - when a c
Uncontrolled recursion in FrankenPHP's PHP-to-Go array converter crashes the entire server process, giving a process-wid
Unauthenticated remote attackers can obtain another client's PHP session identifier from FrankenPHP worker mode before 1
Denial of service in FrankenPHP releases up to and including 1.13.1 allows unauthenticated remote clients to tie up the
Unauthenticated remote attackers can bypass extension-based execution protections in FrankenPHP before 1.13.0 and cause
Cross-request environment leakage in FrankenPHP 1.5.0 through 1.12.7 allows secrets placed in the process environment by
EUVD-2026-125087
GHSA-2v43-gp2p-9228
NVD
CVE.org
EPSS
Exploit-DB