CVE-2026-24894: Github.com/dunglas/frankenphp FrankenPHP Leaks Session Data Between Vulnerability

HIGH
Advisory Identifier: GHSA-r3xh-3r3w-47gp
CWE-613 CWE-384 CWE-269
Published
Advisory Summary

CVE-2026-24894 is a HIGH frankenphp leaks session data between vulnerability (CWE-613: Insufficient Session Expiration) affecting Github.com/dunglas/frankenphp libraries in the Go ecosystem. The issue involves frankenphp leaks session data between requests in worker mode. Remediation is available by upgrading affected packages to version 1.11.2.

CVE-2026-24894 at a Glance

CVE Identifier CVE-2026-24894
GHSA Identifier GHSA-r3xh-3r3w-47gp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Github.com/dunglas/frankenphp
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-24894

To remediate this vulnerability, upgrade all affected Github.com/dunglas/frankenphp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/dunglas/frankenphp fixed: 1.11.2
Upgrade github.com/dunglas/frankenphp to 1.11.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/dunglas/frankenphp

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24894, inspect your project dependencies for Github.com/dunglas/frankenphp:

inspect dependencies for github.com/dunglas/frankenphp

Analyze the terminal output to locate any version of Github.com/dunglas/frankenphp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Github.com/dunglas/frankenphp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary When running FrankenPHP in **worker mode**, the `$_SESSION` superglobal is not correctly reset between requests. This allows a subsequent request processed by the same worker to access the `$_SESSION` data of the previous request (potentially belonging to a different user) before `session_start()` is called. ### Details In standard PHP execution, the environment is torn down completely after every request. In FrankenPHP's worker mode, the application stays in memory, and superglobals are manually reset between requests. The vulnerability exists because `$_SESSION` is stored in the Zend Engine's symbol table (`EG(symbol_table)`). While the standard PHP request shutdown (RSHUTDOWN) decrements the reference count of the session data, it does not remove the `$_SESSION` variable itself from the symbol table. FrankenPHP's reset logic (`frankenphp_reset_super_globals`) previously cleared other superglobals but failed to explicitly delete `$_SESSION`. Consequently, until `session_start()` is called in the new request (which re-initializes the variable), the `$_SESSION` array retains the data from the previous request processed by that specific worker thread. ### Impact This is a **cross-request data leakage** vulnerability. * **Confidentiality:** If an application reads `$_SESSION` before calling `session_start()`, it can access sensitive information (authentication tokens, user IDs, PII) belonging to the previous user. * **Logic Errors / Impersonation:** If application logic relies on `$_SESSION` being empty or unset to detect a "guest" state, or checks for specific keys in `$_SESSION` prior to session initialization, a malicious actor (or accidental race condition) could trigger privilege escalation or user impersonation. This affects only users running FrankenPHP in **worker mode** and not `session_start()` for each request, which is done by default by most frameworks. ### PoC The following steps demonstrate the issue (derived from the regression tests added in the fix): 1. **Client A** sends a request that starts a session and sets sensitive data: ```php // Request 1 session_start(); $_SESSION['secret'] = 'AliceData'; session_write_close(); ``` 2. **Client B** (or the same client without cookies) sends a request to the same worker. This script checks `$_SESSION` *without* starting a session: ```php // Request 2 // session_start() is NOT called if (!empty($_SESSION)) { echo "Leaked Data: " . $_SESSION['secret']; } ``` 3. **Result:** Client B receives "Leaked Data: AliceData". ### Workarounds * Ensure `session_start()` is called immediately at the entry point of your worker script to overwrite any residual data (though this may not cover all edge cases if middleware runs before the controller). * Manually unset `$_SESSION` at the very beginning of the worker loop, before handling the request.

CVE-2026-24894 Affected Github.com/dunglas/frankenphp Versions

1 component(s)
Fixed Versions:
1.11.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/dunglas/frankenphp
Go
< 1.11.2
1.11.2

References

Frequently Asked Questions

What is CVE-2026-24894?
CVE-2026-24894 is a security vulnerability in Github.com/dunglas/frankenphp involving FrankenPHP leaks session data between requests in worker mode under CWE-613: Insufficient Session Expiration.
Which Github.com/dunglas/frankenphp versions are affected?
Affected versions include releases prior to 1.11.2 across affected packages: github.com/dunglas/frankenphp.
What version fixes CVE-2026-24894?
Upgrading to 1.11.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/dunglas/frankenphp affected?
Yes, github.com/dunglas/frankenphp is affected in releases prior to 1.11.2. Upgrade your dependency to 1.11.2 or later.
What CWE is associated with CVE-2026-24894?
CVE-2026-24894 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Go dependencies for CVE-2026-24894?
Run the dependency tree command: 'inspect dependencies for github.com/dunglas/frankenphp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r3xh-3r3w-47gp",
  "modified" : "2026-02-12T22:07:50Z",
  "published" : "2026-02-12T15:29:30Z",
  "aliases" : [ "CVE-2026-24894" ],
  "summary" : "FrankenPHP leaks session data between requests in worker mode",
  "details" : "### Summary\n\nWhen running FrankenPHP in **worker mode**, the `$_SESSION` superglobal is not correctly reset between requests. This allows a subsequent request processed by the same worker to access the `$_SESSION` data of the previous request (potentially belonging to a different user) before `session_start()` is called.\n\n### Details\n\nIn standard PHP execution, the environment is torn down completely after every request. In FrankenPHP's worker mode, the application stays in memory, and superglobals are manually reset between requests.\n\nThe vulnerability exists because `$_SESSION` is stored in the Zend Engine's symbol table (`EG(symbol_table)`). While the standard PHP request shutdown (RSHUTDOWN) decrements the reference count of the session data, it does not remove the `$_SESSION` variable itself from the symbol table. FrankenPHP's reset logic (`frankenphp_reset_super_globals`) previously cleared other superglobals but failed to explicitly delete `$_SESSION`.\n\nConsequently, until `session_start()` is called in the new request (which re-initializes the variable), the `$_SESSION` array retains the data from the previous request processed by that specific worker thread.\n\n### Impact\n\nThis is a **cross-request data leakage** vulnerability.\n\n* **Confidentiality:** If an application reads `$_SESSION` before calling `session_start()`, it can access sensitive information (authentication tokens, user IDs, PII) belonging to the previous user.\n* **Logic Errors / Impersonation:** If application logic relies on `$_SESSION` being empty or unset to detect a \"guest\" state, or checks for specific keys in `$_SESSION` prior to session initialization, a malicious actor (or accidental race condition) could trigger privilege escalation or user impersonation.\n\nThis affects only users running FrankenPHP in **worker mode** and not `session_start()` for each request, which is done by default by most frameworks.\n\n### PoC\n\nThe following steps demonstrate the issue (derived from the regression tests added in the fix):\n\n1. **Client A** sends a request that starts a session and sets sensitive data:\n\n```php\n// Request 1\nsession_start();\n$_SESSION['secret'] = 'AliceData';\nsession_write_close();\n```\n\n2. **Client B** (or the same client without cookies) sends a request to the same worker. This script checks `$_SESSION` *without* starting a session:\n\n```php\n// Request 2\n// session_start() is NOT called\nif (!empty($_SESSION)) {\n    echo \"Leaked Data: \" . $_SESSION['secret'];\n}\n```\n\n\n3. **Result:** Client B receives \"Leaked Data: AliceData\".\n\n### Workarounds\n\n* Ensure `session_start()` is called immediately at the entry point of your worker script to overwrite any residual data (though this may not cover all edge cases if middleware runs before the controller).\n* Manually unset `$_SESSION` at the very beginning of the worker loop, before handling the request.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/dunglas/frankenphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/php/frankenphp/security/advisories/GHSA-r3xh-3r3w-47gp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24894"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/php/frankenphp/commit/24d6c991a7761b638190eb081deae258143e9735"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/php/frankenphp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/php/frankenphp/releases/tag/v1.11.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-384", "CWE-613" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-12T15:29:30Z",
    "nvd_published_at" : "2026-02-12T20:16:10Z"
  }
}