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 field can include ".." segments that, when processed during install, update, or require, resolve outside the intended package directory and allow Composer to chmod an arbitrary host file to world‑readable and world‑executable. This path traversal weakness (CWE‑22) combined with improper permission handling (CWE‑732) permits an attacker to alter existing file permissions on the host, potentially exposing sensitive data or enabling execution of code.

Affected Systems

Any system running Composer before versions 2.2.29 or 2.10.2 is vulnerable when a malicious dependency supplies a bin entry containing ".." path segments. The affected product is the composer:composer package, and the risk applies to developers, CI pipelines, and servers that install PHP dependencies from public or private repositories.

Risk and Exploitability

The CVSS score of 6.1 reflects moderate potential impact, while an EPSS score of < 1% indicates a low probability of exploitation; the vulnerability is not listed in the CISA KEV catalog. Exploitation would involve an attacker delivering a malicious Composer package—typically through Packagist or a private repository—so that Composer processes it. The attacker must have Composer run in an environment where the process has permission to change file modes on the host; the vulnerability does not grant arbitrary code execution but can expose or modify existing files, creating a secondary opportunity for compromise.

Generated by OpenCVE AI on July 26, 2026 at 17:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Composer to version 2.2.29 or later, or 2.10.2 or later.
  • Audit third‑party packages for disallowed ".." entries in their bin definitions to prevent traversal before installation.
  • Run Composer in a non‑privileged account or within a containerized environment to limit the impact of accidental permission changes on the host.

Generated by OpenCVE AI on July 26, 2026 at 17:19 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

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-22

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

  • CWE-732

    Incorrect Permission Assignment for Critical Resource