CVE-2026-42549: Flight has path traversal in `make Controller` CLI That Creates Arbitrary Vulnerability

MODERATE
Advisory Identifier: GHSA-3xjv-pmf2-gf2q
CVSS 4.4
CWE-22
Published
Advisory Summary

CVE-2026-42549 is a MODERATE (CVSS 4.4) controller` cli that creates arbitrary vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Flight has path traversal in `make libraries in the Packagist ecosystem. The issue involves controller` cli that creates arbitrary directories outside project root. Remediation is available by upgrading affected packages to version 3.18.1.

CVE-2026-42549 at a Glance

CVE Identifier CVE-2026-42549
GHSA Identifier GHSA-3xjv-pmf2-gf2q
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Flight has path traversal in `make
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-42549

To remediate this vulnerability, upgrade all affected Flight has path traversal in `make dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

flightphp/core fixed: 3.18.1
Upgrade flightphp/core to 3.18.1
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 flightphp/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42549, inspect your project dependencies for Flight has path traversal in `make:

inspect dependencies for flightphp/core

Analyze the terminal output to locate any version of Flight has path traversal in `make in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.18.1), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Flight has path traversal in `make, 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 The `make:controller` CLI command calls `mkdir(..., recursive: true)` on a path built from the user-supplied controller name, **before** Nette's class-name validation runs. The class-file write is correctly rejected by Nette when the name contains `/`, but the recursive directory creation side effect is already committed — including directories located outside the project root through `../` traversal. ### Affected code `flight/commands/ControllerCommand.php` (≈ 63-66): ```php if (is_dir(dirname($controllerPath)) === false) { $io->info('Creating directory ' . dirname($controllerPath), true); mkdir(dirname($controllerPath), 0755, true); // un-normalized, runs before validation } ``` ### Proof of concept ``` $ php vendor/flightphp/runway/runway make:controller '../../../../tmp/CONTROLLER_TRAVERSAL_TEST/pwn' Creating directory .../app/controllers/../../../../tmp/CONTROLLER_TRAVERSAL_TEST Nette\InvalidArgumentException: Value '../../../../tmp/CONTROLLER_TRAVERSAL_TEST/pwnController' is not valid class name. $ ls /home/user/tmp/CONTROLLER_TRAVERSAL_TEST (directory exists — created before the exception was thrown) ``` ### Impact - **Arbitrary directory creation outside the project root**, executable by any local actor that can run the Flight CLI (developer machine, shared CI build agent, compromised dev container). - Primes log-file planting for chained LFI exploitation (e.g. creating a directory where an attacker can later drop a `.php` file to be included via a distinct template-include weakness). - On Windows, the `\` separator opens additional traversal surface. ### Patch (fixed in `3.18.1`, commit `b8dd23a`) The controller name is now normalized with `basename()` and validated against `^[A-Za-z_][A-Za-z0-9_]*$` before any `mkdir` side effect runs. ### Credit Discovered by **@Rootingg**.

CVE-2026-42549 Affected Flight has path traversal in `make Versions

1 component(s)
Fixed Versions:
3.18.1
Product / Package Ecosystem Affected Versions Fixed Version
flightphp/core
Packagist
< 3.18.1
3.18.1

References

Frequently Asked Questions

What is CVE-2026-42549?
CVE-2026-42549 is a security vulnerability in Flight has path traversal in `make involving controller` CLI that creates arbitrary directories outside project root under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Flight has path traversal in `make versions are affected?
Affected versions include releases prior to 3.18.1 across affected packages: flightphp/core.
What version fixes CVE-2026-42549?
Upgrading to 3.18.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flightphp/core affected?
Yes, flightphp/core is affected in releases prior to 3.18.1. Upgrade your dependency to 3.18.1 or later.
What is the CVSS score of CVE-2026-42549?
CVE-2026-42549 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2026-42549?
CVE-2026-42549 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2026-42549?
Run the dependency tree command: 'inspect dependencies for flightphp/core'. 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-3xjv-pmf2-gf2q",
  "modified" : "2026-05-14T20:39:56Z",
  "published" : "2026-05-06T21:34:39Z",
  "aliases" : [ "CVE-2026-42549" ],
  "summary" : "Flight has path traversal in `make:controller` CLI that creates arbitrary directories outside project root",
  "details" : "### Summary\nThe `make:controller` CLI command calls `mkdir(..., recursive: true)` on a path built from the user-supplied controller name, **before** Nette's class-name validation runs. The class-file write is correctly rejected by Nette when the name contains `/`, but the recursive directory creation side effect is already committed — including directories located outside the project root through `../` traversal.\n\n### Affected code\n`flight/commands/ControllerCommand.php` (≈ 63-66):\n\n```php\nif (is_dir(dirname($controllerPath)) === false) {\n    $io->info('Creating directory ' . dirname($controllerPath), true);\n    mkdir(dirname($controllerPath), 0755, true);   // un-normalized, runs before validation\n}\n```\n\n### Proof of concept\n```\n$ php vendor/flightphp/runway/runway make:controller '../../../../tmp/CONTROLLER_TRAVERSAL_TEST/pwn'\nCreating directory .../app/controllers/../../../../tmp/CONTROLLER_TRAVERSAL_TEST\nNette\\InvalidArgumentException: Value '../../../../tmp/CONTROLLER_TRAVERSAL_TEST/pwnController' is not valid class name.\n\n$ ls /home/user/tmp/CONTROLLER_TRAVERSAL_TEST\n(directory exists — created before the exception was thrown)\n```\n\n### Impact\n- **Arbitrary directory creation outside the project root**, executable by any local actor that can run the Flight CLI (developer machine, shared CI build agent, compromised dev container).\n- Primes log-file planting for chained LFI exploitation (e.g. creating a directory where an attacker can later drop a `.php` file to be included via a distinct template-include weakness).\n- On Windows, the `\\` separator opens additional traversal surface.\n\n### Patch (fixed in `3.18.1`, commit `b8dd23a`)\nThe controller name is now normalized with `basename()` and validated against `^[A-Za-z_][A-Za-z0-9_]*$` before any `mkdir` side effect runs.\n\n### Credit\nDiscovered by **@Rootingg**.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "flightphp/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.18.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/flightphp/core/security/advisories/GHSA-3xjv-pmf2-gf2q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42549"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flightphp/core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T21:34:39Z",
    "nvd_published_at" : "2026-05-13T20:16:21Z"
  }
}