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

Published Nov 24, 2026
·
Updated

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

1 affected component
composer/symfony/filesystem

Event History

Nov 24, 2026
CVE Published
via MITRE·08:55 AM
Data Sourced
via MITRE·08:55 AM
DescriptionWeakness
Data Sourced
via NVD·09:17 AM
DescriptionWeakness

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203