symfony/symfony security advisory
CVE-2026-135803: Filesystem Path Treats Any Prefix Before "://" as a Root, Letting Paths Escape Their Base Directory in symfony/symfony
CVE-2026-135803 is a path traversal vulnerability in the PHP package symfony/symfony, published 24 November 2026. It is fixed in 5.4.56, 6.4.50, 7.4.23 and 8.1.11, one per release line; earlier versions on each line are affected.
published 2026-11-24
- Affected versions
- >= 5.4.0, < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11 - Fixed in
- 5.4.56, 6.4.50, 7.4.23, 8.1.11
- Newest release
- 8.2.0
- Type
- Path traversal / file read
CWE-22 - Exploited in the wild
- Not on the CISA KEV list
checked 2026-11-29
Is your symfony/symfony version affected?
Who can exploit CVE-2026-135803
The record does not say what access is needed yet. Until it is scored, assume anyone who can reach your app can try it.
Technical details
Weakness
Path traversal / file read CWE-22
A file path built from input is not properly restricted, so sequences like ../ can reach files outside the intended folder.
An attacker may read sensitive files on the server, such as configuration containing database credentials.
General description of this issue type. The advisory below covers this bug.
How to fix CVE-2026-135803 in symfony/symfony
- Find the installed version:
composer show symfony/symfony. If you never required it yourself,composer why symfony/symfonyshows which package pulls it in. - Update it:
composer update symfony/symfony --with-all-dependencies. You need the fixed version for your release line (5.4.56, 6.4.50, 7.4.23 and 8.1.11). - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"symfony/symfony": "^8.1.11"if you can take that version), or upgrade the package that requires it. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-135803. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- Validate file names against an allow-list and reject paths containing ../ or absolute paths.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
Is your project exposed to CVE-2026-135803?
Check the one package here, or check everything your project installs at once.
- Check symfony/symfony Enter your installed version and compare it with every known symfony/symfony advisory. Check my version
-
Check your whole composer.lock
The free checker compares every locked package with the same advisory data
composer audituses. Check composer.lock
The CVE-2026-135803 advisory
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.
References
- GitHub security advisory GHSA-6prc-h956-hxjq github.com
- Symfony security advisory symfony.com
- Fix commit 9441dd5 github.com
Other symfony/symfony advisories
- CVE-2026-133744: JsonPath Queries Can Still Hold a Process Through Duplicated Nodes and Repeated Work: Incomplete Fix for CVE-2026-135804 2026-11-25
- CVE-2026-133747: Scoped HTTP Clients With Caching Enabled Send Their Credentials to Any Origin 2026-11-25
- CVE-2026-134791: Unclosed Comments Make the Lexer of ExpressionLanguage Quadratic, Letting Untrusted Expressions Hold a Process 2026-11-25
- CVE-2026-133755: Mailer Trusts Replies That a Man in the Middle Injects Right After STARTTLS 2026-11-25
- CVE-2026-133750: CachingHttpClient Shares Responses Between Users When Credentials Are Set With withOptions() 2026-11-25
- CVE-2026-133762: Without APP_RUNTIME_MODE, HTTP Workers Running Under the CLI SAPI Return Full Exception Dumps in Production 2026-11-25
Related
Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.
Ask about a fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-29. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-25. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-29.
- Compiled by Daniel Lasek at Laskyr from the sources above. Everything outside the quoted description is our plain-English reading of the record, generated from it. Spot an error? Tell us.