CVE-2026-102601: Flysystem WhitespacePathNormalizer's Control-character (CorruptedPathDetected) Check Is Vulnerability
LOWCVE-2026-102601 is a LOW (CVSS 3.5) whitespacepathnormalizer's control-character (corruptedpathdetected) check is vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting Flysystem libraries in the Packagist ecosystem. The issue involves whitespacepathnormalizer's control-character (corruptedpathdetected) check is bypassed by malformed utf-8 in the path, affecting every adapter. Remediation is available by upgrading affected packages to version 3.35.3.
CVE-2026-102601 at a Glance
Security Impact
CVSS: 3.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-102601
To remediate this vulnerability, upgrade all affected Flysystem 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 league/flysystem to 3.35.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for league/flysystem
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-102601, inspect your project dependencies for Flysystem:
inspect dependencies for league/flysystem
Analyze the terminal output to locate any version of Flysystem in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.35.3), 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-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In Flysystem, 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-102601 Affected Flysystem Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
league/flysystem
|
Packagist |
< 3.35.3
|
3.35.3
|
References
Frequently Asked Questions
What is CVE-2026-102601?
Which Flysystem versions are affected?
What version fixes CVE-2026-102601?
Is league/flysystem affected?
What is the CVSS score of CVE-2026-102601?
What CWE is associated with CVE-2026-102601?
How can I check Packagist dependencies for CVE-2026-102601?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cxf4-7mrp-vvpr",
"modified" : "2026-09-30T21:26:45Z",
"published" : "2026-09-29T18:10:14Z",
"aliases" : [ "CVE-2026-102601" ],
"summary" : "Flysystem: WhitespacePathNormalizer's control-character (CorruptedPathDetected) check is bypassed by malformed UTF-8 in the path, affecting every adapter",
"details" : "## Related public issue (context, not a duplicate)\n\nClosed issue #1429 (\"Handle non-UTF-8 paths\", 2024-03-24) raised exactly this general concern and\neven suggested detection via `preg_match('//u', $path) !== 1` -- note the reporter's suggested check\nexplicitly compares `!== 1`, which *would* correctly treat PCRE's `false` return as \"reject.\" The\nmaintainer's reply pointed to the `PathNormalizer` interface as the place to implement this. The\ncontrol-character check that ended up shipping in `WhitespacePathNormalizer`\n(`if (preg_match('#\\p{C}+#u', $unixPath))`) addresses the general concern but does **not** use the\n`!== 1`-style comparison the original issue suggested -- it uses a bare truthy check, which is exactly\nthe gap this report demonstrates. So this is not a duplicate of #1429; it's a concrete bypass\nsurviving in the fix that issue's concern led to.\n\n## Vulnerability Details\n\n**File**: `src/WhitespacePathNormalizer.php`, lines 22-28 (`normalizePath()`) -- the **default**\n`PathNormalizer` used by `Filesystem` for every adapter (Local, FTP, SFTP, S3, AsyncAwsS3, Azure, GCS,\nZipArchive, GridFS, InMemory) unless the application supplies a custom one.\n\n### Root Cause\n\n```php\npublic function normalizePath(string $path): string\n{\n $unixPath = str_replace('\\\\', '/', $path);\n\n if (preg_match('#\\p{C}+#u', $unixPath)) {\n throw CorruptedPathDetected::forPath($path);\n }\n ...\n```\n\n`preg_match()` returns `false` (a PHP engine error) rather than `0` when the subject string is not\nvalid UTF-8 and the pattern uses the `/u` modifier -- PCRE can't even attempt the match. `false` and\n`0` are both falsy in PHP, and `if (preg_match(...))` does not distinguish them. So a path containing\n**any single invalid UTF-8 byte anywhere in the string** makes `preg_match()` fail with a \"Malformed\nUTF-8 characters\" engine error, the `if` evaluates false, and `CorruptedPathDetected` is silently **not**\nthrown -- even when the same string also contains literal control characters this exact check exists\nto catch.\n\nthe identical payload IS correctly rejected once it's valid UTF-8:\n```php\n$n->normalizePath(\"foo\\x1bbar\"); // valid UTF-8, contains ESC -> throws CorruptedPathDetected (correct)\n$n->normalizePath(\"foo\\x80\\x1bbar\"); // 0x80 = invalid lone UTF-8 continuation byte -> NOT thrown (bypass)\n```\n\nThe path-traversal protection is **unaffected** -- it's exact byte-string comparison on\n`/`-delimited segments, independent of UTF-8 validity:\n```php\n$n->normalizePath(\"\\x80/../../etc/passwd\"); // still throws PathTraversalDetected\n```\n\n### Recommended Fix\n```php\npublic function normalizePath(string $path): string\n{\n $unixPath = str_replace('\\\\', '/', $path);\n $matched = preg_match('#\\p{C}+#u', $unixPath);\n\n if ($matched !== 0) {\n // $matched === false means malformed UTF-8 -- must also be treated as corrupted,\n // not silently allowed through.\n throw CorruptedPathDetected::forPath($path);\n }\n ...\n```\n\n### Verification\nDynamically confirmed on `league/flysystem` HEAD `6837e1d` / tag `3.35.2`, PHP 8.4.22 CLI, end-to-end\nthrough `LocalFilesystemAdapter`:\n```\n[1] write() succeeded -- normalizer did NOT reject the path.\n[2] Actual bytes on disk: ...801b5b386d6e6f726d616c2d6c6f6f6b696e672d66696c652e7478741b5b306d...\n[3] Filesystem::listContents() path contains raw ESC (0x1b): YES\n[4] Raw terminal output (via `cat -v`): M-^@^[[8mnormal-looking-file.txt^[[0m^[[2K^[[1Aurgent-invoice.pdf",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "league/flysystem"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.35.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.35.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/thephpleague/flysystem/security/advisories/GHSA-cxf4-7mrp-vvpr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-102601"
}, {
"type" : "WEB",
"url" : "https://github.com/thephpleague/flysystem/commit/ef4a9a557d769b5d472c403125716706a0d9cc77"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/thephpleague/flysystem"
}, {
"type" : "WEB",
"url" : "https://github.com/thephpleague/flysystem/releases/tag/3.35.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-150" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-29T18:10:14Z",
"nvd_published_at" : "2026-09-29T16:17:06Z"
}
}