CVE-2026-55878: symfony/ux-toolkit Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-p9xj-fpr2-jf2q
CVSS 7.8
CWE-22
Published
Advisory Summary

CVE-2026-55878 is a HIGH (CVSS 7.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting symfony/ux-toolkit libraries in the Packagist ecosystem. The issue involves path traversal allows arbitrary file write and read via crafted recipe manifest. Remediation is available by upgrading affected packages to version 2.36.1, 3.2.0.

CVE-2026-55878 at a Glance

CVE Identifier CVE-2026-55878
GHSA Identifier GHSA-p9xj-fpr2-jf2q
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product symfony/ux-toolkit
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-55878

To remediate this vulnerability, upgrade all affected symfony/ux-toolkit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

symfony/ux-toolkit fixed: 2.36.1
Upgrade symfony/ux-toolkit to 2.36.1
symfony/ux-toolkit fixed: 3.2.0
Upgrade symfony/ux-toolkit to 3.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for symfony/ux-toolkit

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-55878, inspect your project dependencies for symfony/ux-toolkit:

inspect dependencies for symfony/ux-toolkit

Analyze the terminal output to locate any version of symfony/ux-toolkit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.36.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In symfony/ux-toolkit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Description The `ux:install` console command installs files from a recipe kit by copying paths listed in a `copy-files` map. The only guard against malicious paths was `Path::isRelative()`, which returns `true` for paths like `../../../etc`. `Path::join()` then resolves the `..` segments without complaint, so the final path can escape the intended directory entirely. A crafted or compromised kit can therefore write attacker-controlled content to arbitrary locations on the developer's machine or CI runner. Because the copy operation creates missing parent directories and can overwrite existing files silently (with `--force` or in non-interactive environments), an attacker who controls a kit can overwrite files such as controllers, git hooks, or `.env` to achieve code execution. The source side of `copy-files` is symmetrically affected, enabling local file reads outside the recipe directory. ### Resolution The fix introduces an `Assert::pathDoesNotEscapeDirectory()` helper that rejects any `copy-files` source or destination path containing a `..` segment, regardless of whether `/` or `\` is used as the separator. This check is enforced in both `RecipeManifest` (which also guards the source Finder) and `File`. As a last line of defense, the installer re-verifies the fully resolved paths with `Path::isBasePath()` immediately before each filesystem read and write. ### Credits Symfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.

CVE-2026-55878 Affected symfony/ux-toolkit Versions

2 component(s)
Fixed Versions:
2.36.13.2.0
Product / Package Ecosystem Affected Versions Fixed Version
symfony/ux-toolkit
Packagist
≥ 2.32.0
< 2.36.1
2.36.1
symfony/ux-toolkit
Packagist
≥ 3.0.0
< 3.2.0
3.2.0

References

Frequently Asked Questions

What is CVE-2026-55878?
CVE-2026-55878 is a security vulnerability in symfony/ux-toolkit involving Path Traversal Allows Arbitrary File Write and Read via Crafted Recipe Manifest under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which symfony/ux-toolkit versions are affected?
Affected versions include releases prior to 2.36.1, 3.2.0 across affected packages: symfony/ux-toolkit.
What version fixes CVE-2026-55878?
Upgrading to 2.36.1, 3.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/ux-toolkit affected?
Yes, symfony/ux-toolkit is affected in releases prior to 2.36.1, 3.2.0. Upgrade your dependency to 2.36.1, 3.2.0 or later.
What is the CVSS score of CVE-2026-55878?
CVE-2026-55878 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-55878?
CVE-2026-55878 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2026-55878?
Run the dependency tree command: 'inspect dependencies for symfony/ux-toolkit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p9xj-fpr2-jf2q",
  "modified" : "2026-06-19T21:42:18Z",
  "published" : "2026-06-19T21:42:18Z",
  "aliases" : [ "CVE-2026-55878" ],
  "summary" : "symfony/ux-toolkit: Path Traversal Allows Arbitrary File Write and Read via Crafted Recipe Manifest",
  "details" : "### Description\nThe `ux:install` console command installs files from a recipe kit by copying paths listed in a `copy-files` map. The only guard against malicious paths was `Path::isRelative()`, which returns `true` for paths like `../../../etc`. `Path::join()` then resolves the `..` segments without complaint, so the final path can escape the intended directory entirely. A crafted or compromised kit can therefore write attacker-controlled content   to arbitrary locations on the developer's machine or CI runner.\n\nBecause the copy operation creates missing parent directories and can overwrite existing files silently (with   `--force` or in non-interactive environments), an attacker who controls a kit can overwrite files such as controllers, git hooks, or `.env` to achieve code execution. The source side of `copy-files` is symmetrically   affected, enabling local file reads outside the recipe directory.\n\n### Resolution\n\nThe fix introduces an `Assert::pathDoesNotEscapeDirectory()` helper that rejects any `copy-files` source or destination path containing a `..` segment, regardless of whether `/` or `\\` is used as the separator. This check is enforced in both `RecipeManifest` (which also guards the source Finder) and `File`. As a last line of defense, the installer re-verifies the fully resolved paths with `Path::isBasePath()` immediately before each filesystem read and write.\n\n### Credits\n\nSymfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/ux-toolkit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.32.0"
      }, {
        "fixed" : "2.36.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/ux-toolkit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/ux/security/advisories/GHSA-p9xj-fpr2-jf2q"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-toolkit/CVE-2026-55878.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/symfony/ux"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T21:42:18Z",
    "nvd_published_at" : null
  }
}