CVE-2026-135803symfony/filesystem Path Traversal
NVD
Vulnerability Summary
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.
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 & Patched Versions
- symfony/filesystem >= 5.4.0 and < 5.4.56
- symfony/filesystem >= 6.0.0 and < 6.4.50
- symfony/filesystem >= 7.0.0 and < 7.4.23
- symfony/filesystem >= 8.0.0 and < 8.1.11
- symfony/symfony >= 5.4.0 and < 5.4.56
- symfony/symfony >= 6.0.0 and < 6.4.50
- symfony/symfony >= 7.0.0 and < 7.4.23
- symfony/symfony >= 8.0.0 and < 8.1.11
- symfony/filesystem 5.4.56
- symfony/filesystem 6.4.50
- symfony/filesystem 7.4.23
- symfony/filesystem 8.1.11
- symfony/symfony 5.4.56
- symfony/symfony 6.4.50
- symfony/symfony 7.4.23
- symfony/symfony 8.1.11
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run symfony/filesystem and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 24, 2026Published
- Nov 24, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new symfony/filesystem CVEsYou are reading CVE-2026-135803. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 24, 2026 09:23 UTC