Filesystem Path Treats Any Prefix Before "://" as a Root, Letting Paths Escape Their Base Directory

Summary

CVECVE-2026-135803
StatePUBLISHED
AssignerSymfony
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-24 09:17:08 UTC
Updated2026-11-24 09:17:08 UTC
DescriptionMost 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

SourceVendorProductVersionPlatforms
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

ReferenceSourceLinkTags
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)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report