Read the docs

Symfony Filesystem Path lets paths escape their base directory

Priority MEDIUM 43CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA.

Summary

symfony/filesystem and symfony/symfony from 5.4.0 before 5.4.56, from 6.0.0 before 6.4.50, from 7.0.0 before 7.4.23 and from 8.0.0 before 8.1.11 treat any text before "://" in a path as a root (CWE-22). The ".." segments in that prefix are not resolved, so isBasePath() can accept a path that escapes its base directory. An application that checks a user-supplied path with isBasePath() or canonicalize() and then opens it can read or write files outside the expected directory.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00773 52nd percentileScored 2026-11-30
Fix Fixed symfony/filesystem (Symfony): 5.4.56, 6.4.50, 7.4.23 +1symfony/symfony (Symfony): 5.4.56, 6.4.50, 7.4.23 +1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonysymfony/filesystem5.4.0 to before 5.4.56; 6.0.0 to before 6.4.50; 7.0.0 to before 7.4.23; 8.0.0 to before 8.1.115.4.56, 6.4.50, 7.4.23, 8.1.11Patch availableCNA
symfonysymfony/symfony5.4.0 to before 5.4.56; 6.0.0 to before 6.4.50; 7.0.0 to before 7.4.23; 8.0.0 to before 8.1.115.4.56, 6.4.50, 7.4.23, 8.1.11Patch availableCNA
  • symfony/filesystem Vendorsymfony Affected 5.4.0 to before 5.4.56; 6.0.0 to before 6.4.50; 7.0.0 to before 7.4.23; 8.0.0 to before 8.1.11 Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11 Patch available CNA
  • symfony/symfony Vendorsymfony Affected 5.4.0 to before 5.4.56; 6.0.0 to before 6.4.50; 7.0.0 to before 7.4.23; 8.0.0 to before 8.1.11 Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11 Patch available CNA

Remediation

Upgrade symfony/filesystem to 5.4.56, 6.4.50, 7.4.23 or 8.1.11 for the matching branch. Upgrade symfony/symfony to 5.4.56, 6.4.50, 7.4.23 or 8.1.11 for the matching branch.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA symfony/filesystem (Symfony) Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11
  • Fix · CNA symfony/symfony (Symfony) Fixed in 5.4.56, 6.4.50, 7.4.23, 8.1.11

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    symfony/symfony 5.4.56, 6.4.50 and 2 more versions

    3 records Highest priority Priority MEDIUM 1 MEDIUM, 2 LOW

    Other records, highest priority first

    • TI-2026-97180 Generated URLs Can Point to a Host Chosen by the ClientPriority LOW 38
    • TI-2026-97179 Front-of-PHP Path Rules Bypassed by Appending to the Script NamePriority LOW 35

Timeline

  1. 2026-11-24 Threatist record created from CVE-2026-135803
  2. 2026-11-24 Alias added: GHSA-3gqv-8wv6-5qw7
  3. 2026-11-25 CVSS score added · CISA ADP
  4. 2026-11-25 CISA SSVC decision points changed
  5. 2026-11-26 EPSS moved to the 50th–90th percentile

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-08704 Symfony storing cookie headers in HttpCache CVSS 3.1HIGH 8.8
  • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHP CVSS 4.0HIGH 8.7
  • TI-2026-98148 Nested short ternaries make the Symfony expression parser hang CVSS 4.0HIGH 8.7
See all 129 →

Sources