Composer Remote Code Execution vulnerability via web-accessible composer.phar
Published 29 Sept 2023 · Updated 13 Feb 2025
Is your project on an affected composer/composer?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <1.10.27
- Fixed in
- 1.10.27
composer require composer/composer:^1.10.27- Affected
- >=2.0.0 <2.2.22
- Fixed in
- 2.2.22
composer require composer/composer:^2.2.22- Affected
- >=2.3.0 <2.6.4
- Fixed in
- 2.6.4
composer require composer/composer:^2.6.4Details
Impact
Users publishing a composer.phar to a public web-accessible server where the composer.phar can be executed as a php file may be impacted if PHP also has register_argc_argv enabled in php.ini.
Patches
2.6.4, 2.2.22 and 1.10.27 patch this vulnerability.
Workarounds
Make sure register_argc_argv is disabled in php.ini, and avoid publishing composer.phar to the web as this really should not happen.
Is GHSA-jm6m-4632-36hf in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected composer/composer, and gives you the command that fixes it.
More advisories for composer/composer
- MediumCVE-2026-59944Composer: GHSA-gjfg-22fp-rrxx fix bypass via symlinked package bin path · 2 Oct 2026
- HighCVE-2026-84361Composer arbitrary command execution via a malicious package's Perforce source URL · 8 Sept 2026
- MediumCVE-2026-59946Composer: Path traversal in package bin field lets dependencies chmod arbitrary host files · 20 Jul 2026
- MediumCVE-2026-59947Composer: URL-embedded HTTP-Basic username leaks to verbose logs (GitHub PAT exposure) · 20 Jul 2026
- HighCVE-2026-59948Composer: Arbitrary file write outside vendor via malicious transitive package name · 20 Jul 2026
- HighCVE-2026-45793Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs · 19 May 2026
References
- Linkgithub.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-43655
- Linkgithub.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d
- Linkgithub.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c
- Linkgithub.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c
- Packagegithub.com/composer/composer
- Linklists.debian.org/debian-lts-announce/2024/03/msg00030.html
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAE
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.