Junglewise Threat Intelligence

CVE-2026-59946: Composer path traversal in package bin field

CVE-2026-59946 · Severity: medium · CVSS 6.1 · Published 2026-07-08

Executive brief

Composer is a popular dependency manager for the PHP programming language. A vulnerability in how it handles package installation allows a malicious dependency to change the file permissions of sensitive files on the host machine, such as SSH keys or configuration files. This could allow other local users on a shared system to read private data that was previously restricted.

Technical details

A path traversal vulnerability exists in Composer's handling of the 'bin' field within a package's composer.json file. When installing a package, Composer attempts to make specified binaries executable by applying a chmod operation. By using '..' path segments in the bin field, a malicious package can target files outside the package's installation directory. If the user running Composer has sufficient permissions, the target file's mode is changed to 0755 (world-readable and world-executable). This can be triggered by any direct or transitive dependency during 'install', 'update', or 'require' operations. The issue is fixed in versions 2.2.29 and 2.10.2 by rejecting bin entries containing path traversal segments.

Affected products

  • Composer Composer >= 1.0.0, < 2.2.29; >= 2.3.0, < 2.10.2

Timeline

  • 2026-07-01: disclosed
  • 2026-07-08: advisory: NVD publication
  • 2026-07-20: patched: GitHub Advisory updated with full details

References

Related threats