PHP FrankenPHP Unicode path confusion can execute unintended files

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-24895?

CVE-2026-24895 is a vulnerability classified as Incorrect Behavior Order: Validate Before Canonicalize, affecting frankenphp (affected versions: < 1.11.2). This vulnerability is rated High, with a CVSS score of 8.9. Public exploit code or evidence is available for this vulnerability, but that does not confirm exploitation in the wild.

Overview

Original source data

FrankenPHP is a modern application server for PHP. Prior to 1.11.2, FrankenPHP’s CGI path splitting logic improperly handles Unicode characters during case conversion. The logic computes the split index (for finding.php) on a lowercased copy of the request path but applies that byte index to the original path. Because strings.ToLower() in Go can increase the byte length of certain UTF-8 characters (e.g., Ⱥ expands when lowercased), the computed index may not align with the correct position in the original string. This results in an incorrect SCRIPT_NAME and SCRIPT_FILENAME, potentially causing FrankenPHP to execute a file other than the one intended by the URI. This vulnerability is fixed in 1.11.2.

Affected products and scope

  • php frankenphp: versions < 1.11.2 are identified as affected.
  • The vendor identifies 1.11.2 as patched.
  • The record does not separately establish the status of later or parallel release branches beyond the stated boundary.

Technical details

FrankenPHP's CGI path splitter searches for a configured script suffix such as .php case-insensitively. In the vulnerable logic, splitPos() applies strings.ToLower() to the request path, obtains a byte offset with strings.Index, and splitCgiPath() uses that offset to slice the original path and derive SCRIPT_NAME and SCRIPT_FILENAME. Some UTF-8 characters become longer during lowercasing, so the offset from the transformed string can point past the corresponding location in the original byte string. A crafted URI containing such a character before the script suffix can therefore cause the server to select the wrong script path, including a file whose on-disk name does not have a PHP extension. The vendor advisory identifies execution of attacker-controlled uploaded content as PHP as the resulting path-confusion condition, with possible remote code execution when such content is reachable from the document root or another reachable path. The evidence establishes the indexing flaw and this deployment-dependent consequence, but does not establish that every FrankenPHP deployment exposes a suitable attacker-controlled file.

Exploitability

Remote network reachability through an HTTP request URI is sufficient to reach the vulnerable path-splitting logic when CGI handling is enabled and the request is routed through it. The normalized record identifies low attack complexity, no required privileges, and no user interaction. Exploitation requires a path containing Unicode that changes byte length during case conversion; the most consequential scenario also requires a file that the attacker can place or otherwise influence within the document root or another reachable path. The vendor advisory contains a proof of concept, and the record marks public exploit material as available. The supplied evidence does not confirm active exploitation in the wild.

Technical impact

Successful exploitation can make FrankenPHP derive an incorrect SCRIPT_FILENAME and execute a file other than the one named by the intended URI. If the selected file contains executable PHP code, this can become remote code execution in the privileges and runtime context of the FrankenPHP process. Depending on filesystem permissions and application configuration, an attacker could read data, modify content, or disrupt service. The practical impact depends on the document root, process permissions, and ability to control files; the evidence does not establish impact to other systems or confirm a breach.

Business impact

Deployments that accept uploads into the public document root or another path reachable by FrankenPHP face the clearest operational risk. An attacker may cause a safe-extension file to be interpreted as PHP, potentially turning an upload feature into code execution. Depending on process permissions, this could lead to unauthorized access to application data, modification of served content, or service disruption. The evidence identifies no specific victim, breach, or campaign.

Remediation

  1. Upgrade php frankenphp to the confirmed patched release, 1.11.2.
  2. If an immediate upgrade is not possible, store user-uploaded files outside the public document root and outside paths reachable by the PHP execution flow.
  3. As a temporary network control, apply strict WAF rules to reject URL paths containing the relevant multibyte Unicode characters. This is defense in depth and does not replace the upgrade.
  4. After remediation, recheck every FrankenPHP binary, container image, and running instance to ensure that no deployment remains on an affected release.

Detection

  1. Inventory every FrankenPHP binary, package, and container image, and record the exact version of each instance currently serving traffic.
  2. Identify deployments using CGI path splitting, script suffixes such as .php, their document roots, and workflows that allow uploads or file creation in paths reachable by FrankenPHP.
  3. Review access logs for URIs containing multibyte Unicode characters before the .php split or path info, especially requests involving files with non-PHP extensions. This is a precautionary review, not a confirmed indicator of compromise.
  4. Where CGI variables are logged, compare SCRIPT_NAME and SCRIPT_FILENAME with the actual URI; look for uploaded files with safe extensions such as .txt being executed as PHP.
  5. Verify that each running instance uses the patched release. The absence of suspicious log events does not prove that a deployment is safe.
Sources (19)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.