CVE-2026-135803: Filesystem Path Treats Any Prefix Before "://" as a Root, Letting Paths Escape Their Base Directory
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.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to filesystem access outside the intended directory?
Applications are exposed when they build a path from user-controlled input, validate it with Path::isBasePath() or Path::canonicalize(), and then open the resulting path. Those checks can incorrectly treat a path as remaining under its expected base directory.
What does an attacker need to exploit this issue?
An attacker needs to influence a path that is processed by the affected Path methods and subsequently used for file access. For AssetMapper, a malicious or compromised remote package can supply a CSS URL that causes a write outside assets/vendor during importmap:require or importmap:install.
Are Symfony AssetMapper users affected?
Symfony 6.4 and later AssetMapper users are affected when processing remote package CSS references. A crafted CSS url() can cause the package installation commands to write a file outside the assets/vendor directory.
Which Path operations should be reviewed?
Review uses of Path::isBasePath(), canonicalize(), join(), makeAbsolute(), and makeRelative(). They rely on the affected path splitting behavior described in the advisory.
How can teams identify potentially affected code paths?
Look for code that accepts or incorporates user input into a filesystem path, uses one of the affected Path methods as a containment or normalization check, and then reads from or writes to that path. Also review remote packages used by AssetMapper for CSS URL references processed during package installation.