Bug 2291429 (CVE-2024-35242)

Summary: CVE-2024-35242 composer: crafted branch names can lead to command injection
Product: [Other] Security Response Reporter: Rohit Keshri <rkeshri>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2291433, 2291434    
Bug Blocks:    

Description Rohit Keshri 2024-06-12 05:49:23 UTC
Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `composer install` command running inside a git/hg repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. Patches are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid cloning potentially compromised repositories.

https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396
https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467
https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmf

Comment 1 Rohit Keshri 2024-06-12 05:52:38 UTC
Created composer tracking bugs for this issue:

Affects: epel-all [bug 2291434]
Affects: fedora-all [bug 2291433]