Filesystem Path Treats Any Prefix Before "://" as a Root, Letting Paths Escape Their Base Directory
Summary
| CVE | CVE-2026-135803 |
|---|---|
| State | PUBLISHED |
| Assigner | Symfony |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 09:17:08 UTC |
| Updated | 2026-11-24 09:17:08 UTC |
| Description | Most methods of Symfony\Component\Filesystem\Path rely on Path::split(), which takes everything before the first :// as the root of a path. It doesn't check that this prefix is a URI scheme, so the .. segments in that prefix are never resolved. PHP sees a scheme only at the start of a string. So /base/../x://../secret.txt is a plain local path to /secret.txt for PHP, while Path::isBasePath('/base', '/base/../x://../secret.txt') returns true. canonicalize(), join(), makeAbsolute() and makeRelative() are affected the same way. Some applications check a path built from user input with isBasePath() or canonicalize(), and then open it. They can be made to read or write files outside the expected directory. On Symfony 6.4 and later, the AssetMapper component builds with Path::join() the path of the files that a remote package references from its CSS. A malicious or compromised package can therefore make importmap:require or importmap:install write a file of its choice outside assets/vendor. For example, the CSS url(../../../../../public/x://shell.php) writes public/x:/shell.php. A prefix is now a scheme only when PHP would look for a stream wrapper with that name. That is two or more letters, digits, +, - or ., followed by :// at the start of the path. Other prefixes are regular path segments, and the .. segments after them are resolved. Real schemes such as phar://, file://, vfs:// or compress.zlib:// keep working. |
Risk And Classification
Problem Types: CWE-22 | CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Symfony | Symfony/filesystem | affected 5.4.0 5.4.56 semver | Not specified |
| CNA | Symfony | Symfony/filesystem | affected 6.0.0 6.4.50 semver | Not specified |
| CNA | Symfony | Symfony/filesystem | affected 7.0.0 7.4.23 semver | Not specified |
| CNA | Symfony | Symfony/filesystem | affected 8.0.0 8.1.11 semver | Not specified |
| CNA | Symfony | Symfony/symfony | affected 5.4.0 5.4.56 semver | Not specified |
| CNA | Symfony | Symfony/symfony | affected 6.0.0 6.4.50 semver | Not specified |
| CNA | Symfony | Symfony/symfony | affected 7.0.0 7.4.23 semver | Not specified |
| CNA | Symfony | Symfony/symfony | affected 8.0.0 8.1.11 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| symfony.com/cve-2026-135803 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | symfony.com | |
| github.com/symfony/symfony/security/advisories/GHSA-6prc-h956-hxjq | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | github.com | |
| github.com/symfony/symfony/commit/9441dd5f05e78ad898317083828c1acebff586a1 | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Nicolas Grekas (en)
There are currently no legacy QID mappings associated with this CVE.