Summary
Methods of Symfony\Component\Filesystem\Path treat any prefix before "://" as a root without checking that it is a URI scheme, so base-directory checks can be bypassed. The CVSS 3.1 score is 9.1 (critical severity).
What happened
Most methods of Symfony's Path class rely on Path::split(), which takes everything before the first "://" as the root of a path without verifying that the prefix is actually a URI scheme. As a result, ".." segments in that prefix are never resolved. PHP only recognizes a scheme at the very start of a string, so a path that Path considers to be inside a base directory can point, as far as PHP is concerned, to a different local location. canonicalize(), join(), makeAbsolute() and makeRelative() are affected in the same way, and isBasePath() can return an incorrect result. Applications that check a path built from user input with isBasePath() or canonicalize() and then open it may end up reading or writing files outside the intended directory. In addition, on Symfony 6.4 and later, the AssetMapper component uses Path::join() to build the path of files that a remote package references from its CSS; a malicious or compromised package could make importmap:require or importmap:install write a file of its choice outside assets/vendor. The issue is classified as CWE-22 (path traversal).
Why it matters
The CVSS 3.1 score is 9.1 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, provided by CISA-ADP) and the severity is listed as critical, with high impact on confidentiality and integrity. The source does not report active exploitation and does not state that this is a zero-day. Practical risk depends on whether an application uses these methods to validate user-influenced paths, or uses AssetMapper with untrusted remote packages.
Affected products and versions
symfony/filesystem and symfony/symfony (Composer, vendor Symfony): >= 5.4.0, < 5.4.56; >= 6.0.0, < 6.4.50; >= 7.0.0, < 7.4.23; >= 8.0.0, < 8.1.11.
| Product | Versions | Fixed in |
|---|---|---|
| Symfony symfony/filesystem | >= 5.4.0, < 5.4.56 | — |
| Symfony symfony/filesystem | >= 6.0.0, < 6.4.50 | — |
| Symfony symfony/filesystem | >= 7.0.0, < 7.4.23 | — |
| Symfony symfony/filesystem | >= 8.0.0, < 8.1.11 | — |
| Symfony symfony/symfony | >= 5.4.0, < 5.4.56 | — |
| Symfony symfony/symfony | >= 6.0.0, < 6.4.50 | — |
| Symfony symfony/symfony | >= 7.0.0, < 7.4.23 | — |
| Symfony symfony/symfony | >= 8.0.0, < 8.1.11 | — |
Action recommended by the source
The source does not include an explicit list of fixed versions or upgrade instructions. The vendor describes that, after the fix, a prefix is treated as a scheme only when PHP would look for a stream wrapper with that name (two or more letters, digits, +, - or ., followed by "://" at the start of the path); other prefixes become regular path segments and the ".." segments after them are resolved, while real schemes such as phar://, file://, vfs:// or compress.zlib:// keep working. A patch commit and vendor advisories are available at https://symfony.com/cve-2026-135803 and https://github.com/symfony/symfony/security/advisories/GHSA-6prc-h956-hxjq; readers are advised to consult them for the corrected versions.
Sources and references
- https://symfony.com/cve-2026-135803 — CVE Program
- https://github.com/symfony/symfony/security/advisories/GHSA-6prc-h956-hxjq — CVE Program
- https://github.com/symfony/symfony/commit/9441dd5f05e78ad898317083828c1acebff586a1 — CVE Program
Weaknesses (CWE): CWE-22
Relevant change history
Advisory correction
The preliminary version was replaced by the full write-up.
Published
Preliminary advisory published.