Description
Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, a Composer package bin entry containing .. path segments can resolve outside the package install directory and cause Composer's binary installation flow to chmod an existing host file to a world-readable and world-executable mode during composer install, update, or require. This issue is fixed in versions 2.2.29 and 2.10.2.
Published: 2026-07-08
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Composer’s bin definition field may contain ".." path segments that, when evaluated during installation, expansion, or required processing, resolve to locations outside the package installation directory. This path traversal flaw (CWE‑22) combined with improper permission handling (CWE‑732) allows Composer to chmod an arbitrary host file to world‑readable and world‑executable, effectively modifying existing file permissions on the host system.

Affected Systems

Any system running Composer lower than versions 2.2.29 or 2.10.2 is vulnerable whenever a Composer package supplies a bin entry with ".." segments. The affected product is the composer:composer package; developers, continuous integration pipelines, and production servers that install PHP dependencies from potentially untrusted sources are all at risk.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate potential impact, while the EPSS score of < 1% reflects a low probability of exploitation. The vulnerability is not listed in CISA KEV. Based on the description, it is inferred that an attacker could deliver a malicious Composer package through a repository (such as Packagist or a private repository) so that Composer processes it. The exploit requires that the Composer process have permission to change file modes on the host. The vulnerability does not grant arbitrary code execution but can lead to unintended exposure or modification of file permissions, which could serve as a foothold for further compromise.

Generated by OpenCVE AI on July 31, 2026 at 13:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Composer to version 2.2.29 or newer, or 2.10.2 or newer.
  • Audit the bin definitions of third‑party packages to ensure no prohibited ".." path segments are present before installation.
  • Run Composer under a non‑privileged user or within a container‑based environment to restrict the effect of any permission changes on the underlying host.

Generated by OpenCVE AI on July 31, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gjfg-22fp-rrxx Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files
History

Fri, 10 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Getcomposer
Getcomposer composer
Vendors & Products Getcomposer
Getcomposer composer

Thu, 09 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
Description Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, a Composer package bin entry containing .. path segments can resolve outside the package install directory and cause Composer's binary installation flow to chmod an existing host file to a world-readable and world-executable mode during composer install, update, or require. This issue is fixed in versions 2.2.29 and 2.10.2.
Title Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files
Weaknesses CWE-22
CWE-732
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N'}


Subscriptions

Getcomposer Composer
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T14:41:23.436Z

Reserved: 2026-07-07T18:49:15.607Z

Link: CVE-2026-59946

cve-icon Vulnrichment

Updated: 2026-07-09T14:21:08.559Z

cve-icon NVD

Status : Deferred

Published: 2026-07-08T20:16:59.707

Modified: 2026-07-10T19:14:18.563

Link: CVE-2026-59946

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T14:00:07Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-732

    Incorrect Permission Assignment for Critical Resource