/

CVE-2026-55878

Severity:

HIGH RISK

(7.8)

Path Traversal (CWE-22) in Symfony UX Recipe Install

CVE-2026-55878

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Local File Read

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Symfony UX's ux:install console command allows crafted recipe kits to copy files to or read files from arbitrary locations on the filesystem.

When a kit's copy-files map includes specially formed relative paths, attacker-controlled content can escape the recipe directory and interact with sensitive local files wherever the command is executed.

Affected context

This vulnerability appears in Symfony projects that use Symfony UX and invoke the ux:install console command to install recipe kits.

It becomes relevant when applications consume kits that may be untrusted, compromised, or pulled from external sources, especially in environments where the console command is run with elevated privileges.

The issue is tied to the handling of relative paths in the copy-files map, which can be abused to escape the intended recipe directory and affect arbitrary locations on the host filesystem.

Exploit preconditions

  • Attack surface: The ux:install console command for Symfony UX recipe installation.
  • Required access: Ability to supply, modify, or influence the recipe kit or its copy-files map (for example, controlling a package or repository that provides the kit).
  • Trigger point: Execution of ux:install, which processes the copy-files map and writes or reads files based on the provided paths.
  • Why exploitation is possible: The path validation relies on Path::isRelative(), which accepts traversal patterns such as ../../../etc, enabling paths that escape the recipe directory and reach arbitrary filesystem locations.

Why this happens

The root cause is improper validation of filesystem paths before file operations are performed, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal").

Symfony UX's installer treats paths that are technically "relative" as safe, without enforcing that they remain inside a designated base directory or normalizing and checking for traversal sequences like ../.

This insecure pattern allows user-controlled input (from the recipe kit) to influence the destination and source paths for file copying, resulting in file reads or writes outside the intended recipe directory.

Potential impact

  • Attacker-controlled content may be written to arbitrary locations on the filesystem accessible to the Symfony project.
  • Critical configuration or application files could be overwritten, potentially leading to code execution or application compromise.
  • Sensitive local files, such as environment configuration or credentials, may be read via recipe processing and exfiltrated during installation.
  • Development and CI environments that automate ux:install can be silently poisoned by malicious or compromised kits.

General mitigation guidance

Mitigation generally focuses on enforcing strict directory boundaries and reducing trust in external recipe kits.

Useful defensive patterns include:

  • Normalizing and canonicalizing paths, then rejecting any path that resolves outside a defined base directory.
  • Implementing allowlists for copy targets and prohibiting traversal segments (..) or absolute paths in kit definitions.
  • Treating recipe kits as untrusted input and applying integrity checks or signatures before installation.
  • Running installation commands with least privilege, avoiding elevated permissions that would widen the consequences of file writes.
  • Segregating build and deployment environments so that compromised kits cannot directly impact production systems.

How teams detect issues like this

Organizations can look for this class of issue through a combination of code and process checks:

  • Static analysis rules or linters that flag the use of path manipulation functions without canonicalization and directory boundary checks.
  • Code review practices that focus on any logic performing filesystem operations based on external or kit-supplied input, especially in installers or scaffolding tools.
  • Policy enforcement to restrict or audit the sources of recipe kits, including checksums, signatures, or repository whitelists.
  • Monitoring CI and build logs for anomalous file copy destinations (e.g., paths that traverse upward or touch sensitive directories) when running ux:install.

Sources

SourceLink
github.comgithub.com/symfony/ux/commit/7b4ddf3764bf269a1b5fde5bf03c4bce568694e4
github.comgithub.com/symfony/ux/releases/tag/v2.36.1
github.comgithub.com/symfony/ux/releases/tag/v3.2.0
github.comgithub.com/symfony/ux/security/advisories/GHSA-p9xj-fpr2-jf2q

Frequently asked

questions

Typically, it is exploited through supply-chain or local actions rather than direct HTTP requests. An attacker must control or compromise a recipe kit that your project uses, so the risk is highest when kits come from untrusted or unverified sources.

The attacker needs the ability to supply or influence the recipe kit consumed by ux:install. This might be through control of a package repository, a compromised dependency, or tampering with kit files before installation, combined with someone running the console command.

The safest pattern is to strictly enforce that all paths used during installation resolve within a predefined recipe directory. Normalize paths, reject traversal segments, and ensure that no user-controlled input can direct file operations outside that base path, while also reducing the privileges under which the installer runs.

Consistently treat all file paths derived from external or configuration input as untrusted, apply canonicalization, and verify directory boundaries before performing filesystem operations. Complement these technical controls with secure supply-chain practices, such as validating kit integrity, using trusted repositories, and adding automated checks in CI to detect unsafe path usage.

Find out what's already
exploitable in your codebase.