{"id":"CVE-2026-59946","published":"2026-07-08T19:32:38Z","modified":"2026-07-09T14:41:23Z","title":"Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files","vendor":"composer","product":"composer","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00141,"percentile":0.03489,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-732","name":"Incorrect Permission Assignment for Critical Resource"}],"references":[{"url":"https://github.com/composer/composer/security/advisories/GHSA-gjfg-22fp-rrxx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0","tags":["x_refsource_MISC"]},{"url":"https://github.com/composer/composer/commit/c50b1efd13ebd73f6dca19b31424c5a02bf93cc1","tags":["x_refsource_MISC"]},{"url":"https://github.com/composer/composer/releases/tag/2.10.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/composer/composer/releases/tag/2.2.29","tags":["x_refsource_MISC"]}],"priority":{"score":5.0,"factors":[{"name":"EPSS percentile","points":0.7},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"composer","affectedVersions":[{"vendor":"composer","product":"composer","versions":[">= 1.0, < 2.2.29",">= 2.3.0, < 2.10.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-09T14:21:07.902689Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"composer/composer","vulnerableRanges":[">=2.3.0, <2.10.2",">=1.0.0, <2.2.29"],"patched":["2.10.2","2.2.29"],"from":["GHSA-gjfg-22fp-rrxx"],"provenance":"source"}],"summary":{"text":"Composer, the PHP dependency manager, has a path traversal flaw in its handling of the package bin field: a bin entry containing \"..\" path segments can resolve outside the package's install directory. An attacker who can get a malicious package into a project's dependencies can trigger this during composer install, update, or require, so that Composer's binary installation step chmods an existing host file to world-readable and world-executable, which requires local access and user interaction (the victim running Composer).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:20:02Z"},"euvd":{"id":"EUVD-2026-42360","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-composer-cve-2026-59946","children":[{"from":"CVE-2026-59946","to":"CVE-2026-59944","relation":"bypass","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"bypass","quote":"From 1.0 until 2.2.30 and from 2.3.0 until 2.10.3, a malicious or compromised dependency can bypass the earlier CVE-2026-59946 binary-path hardening because Composer validates literal parent-directory segments only during dependency resol…","from":"CVE.org","in":"CVE-2026-59944"}]},{"from":"CVE-2026-59946","to":"CVE-2026-84361","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Composer/Package/Loader/ValidatingArrayLoader.php"],"commits":["https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0","https://github.com/composer/composer/commit/c50b1efd13ebd73f6dca19b31424c5a02bf93cc1","https://github.com/composer/composer/commit/0aac50528e83ed635cf788333635897469440220","https://github.com/composer/composer/commit/199ad81a9cc6a2a5164ad79a8da26b2e19e521af"],"basis":"shared function","functions":["load"]}]}],"packageHistory":[{"cve":"CVE-2026-40176","published":"2026-04-15","fixed":"2.9.6","kev":false},{"cve":"CVE-2026-40261","published":"2026-04-15","fixed":"2.9.6","kev":false},{"cve":"CVE-2026-45793","published":"2026-07-15","fixed":"2.9.8","kev":false,"link":{"from":"CVE-2026-45793","to":"CVE-2026-59946","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:composer/composer","fromFixed":"2.9.8","toFixed":"2.10.2","daysApart":-7}]}},{"cve":"CVE-2026-59946","published":"2026-07-08","fixed":"2.10.2","kev":false},{"cve":"CVE-2026-59947","published":"2026-07-08","fixed":"2.10.2","kev":false},{"cve":"CVE-2026-59948","published":"2026-07-08","fixed":"2.10.2","kev":false},{"cve":"CVE-2026-59944","published":"2026-09-16","fixed":"2.10.3","kev":false}],"package":"Packagist:composer/composer"}}