Live threats

All CVEs / Symfony

CVE-2026-135803symfony/filesystem

Path Validation Bypass in Symfony Filesystem

Critical 9.1 No auth neededRecent

Priority
76
CVSS 3.1
9.1
EPSS
—
Auth required
No
Published
Nov 24, 2026
Updated
Nov 25, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

What happens

Symfony's Filesystem component incorrectly interprets path prefixes as URI schemes, allowing ".." segments to bypass resolution. An attacker can evade path validation checks with isBasePath() or canonicalize() to read or write files outside the intended directory, including code injection in applications using AssetMapper.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available

Update symfony/filesystem and symfony/symfony to patched versions that properly validate URI schemes according to PHP standards.

Vendor advisory · symfony.com ↗

  1. Apply the vendor's security update for symfony/filesystem.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.