# GHSA-6PRC-H956-HXJQ: Filesystem Path Treats Any Prefix Before "://" as a Root, Letting Paths Escape Their Base Directory

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-11-04
- Modified: 2026-11-24

## Tracked as

- [CVE-2026-135803](https://cve.now/CVE-2026-135803.md): Symfony Filesystem path traversal in the Path class

## Affected versions

- symfony/filesystem (Packagist): from 5.4.0, fixed in 5.4.56
- symfony/filesystem (Packagist): from 6, fixed in 6.4.50
- symfony/filesystem (Packagist): from 7, fixed in 7.4.23
- symfony/filesystem (Packagist): from 8, fixed in 8.1.11
- symfony/symfony (Packagist): from 5.4.0, fixed in 5.4.56
- symfony/symfony (Packagist): from 6, fixed in 6.4.50
- symfony/symfony (Packagist): from 7, fixed in 7.4.23
- symfony/symfony (Packagist): from 8, fixed in 8.1.11

## Description

### Description

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`.

### Resolution

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.

The patch for this issue is available [here](https://github.com/symfony/symfony/commit/9441dd5f05e78ad898317083828c1acebff586a1) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).

### Credits

We would like to thank Nicolas Grekas for reporting the issue and providing the fix.

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-6prc-h956-hxjq

Page: https://cve.now/GHSA-6PRC-H956-HXJQ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
