CVE-2026-42549: Flight has path traversal in `make Controller` CLI That Creates Arbitrary Vulnerability
MODERATECVE-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
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).
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.
Upgrade flightphp/core to 3.18.1
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
CVE-2026-42549 Affected Flight has path traversal in `make Versions
1 component(s)| 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?
Which Flight has path traversal in `make versions are affected?
What version fixes CVE-2026-42549?
Is flightphp/core affected?
What is the CVSS score of CVE-2026-42549?
What CWE is associated with CVE-2026-42549?
How can I check Packagist dependencies for CVE-2026-42549?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}