CVE-2026-84361: Composer arbitrary command execution via a malicious package's Perforce source URL
If the p4 Perforce CLI client is installed, a malicious dependency package from a package repository allowing arbitrary perforce source URLs (packagist.org is safe) could execute arbitrary commands when running composer install or composer update. Composer passed a package’s Perforce source address to the p4 CLI client without validating it. The p4 CLI client accepts addresses that mean “run this local command” instead of “connect to this server”. This is remote code execution with the privileges of the user or CI account running Composer.
References
- github.com/advisories/GHSA-rvx4-ffvw-m9q3
- github.com/composer/composer/commit/0aac50528e83ed635cf788333635897469440220
- github.com/composer/composer/commit/199ad81a9cc6a2a5164ad79a8da26b2e19e521af
- github.com/composer/composer/releases/tag/2.10.3
- github.com/composer/composer/releases/tag/2.2.30
- github.com/composer/composer/security/advisories/GHSA-rvx4-ffvw-m9q3
- nvd.nist.gov/vuln/detail/CVE-2026-84361
Code Behaviors & Features
Detect and mitigate CVE-2026-84361 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →