CVE-2024-35241

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-35241
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35241.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-35241
Aliases
Downstream
Related
Published
2024-06-10T21:19:47Z
Modified
2025-10-15T09:28:13.602687Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Composer vulnerable to command injection via malicious git branch name
Details

Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the status, reinstall and remove commands with packages installed from source via git containing specially crafted branch names in the repository can be used to execute code. Patches for this issue are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid installing dependencies via git by using --prefer-dist or the preferred-install: dist config setting.

References

Affected packages

Git / github.com/composer/composer

Affected ranges

Type
GIT
Repo
https://github.com/composer/composer
Events
Type
GIT
Repo
https://github.com/composer/composer
Events

Affected versions

2.*

2.2.11
2.2.12
2.2.13
2.2.14
2.2.15
2.2.16
2.2.17
2.3.0
2.3.1
2.3.10
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.3.9
2.4.0
2.4.0-RC1
2.4.1
2.4.2
2.4.3
2.4.4
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.5.8
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.7.0
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6

Git / github.com/composer/composer

Affected ranges

Database specific

{
    "unresolved_versions": [
        {
            "events": [
                {
                    "introduced": "0"
                },
                {
                    "last_affected": "39"
                }
            ],
            "type": ""
        },
        {
            "events": [
                {
                    "introduced": "0"
                },
                {
                    "last_affected": "40"
                }
            ],
            "type": ""
        }
    ]
}

Git / github.com/composer/composer

Affected ranges

Type
GIT
Repo
https://github.com/composer/composer
Events

Git / github.com/composer/composer

Affected ranges

Type
GIT
Repo
https://github.com/composer/composer
Events

Affected versions

2.*

2.2.11
2.2.12
2.2.13
2.2.14
2.2.15
2.2.16
2.2.17
2.3.0
2.3.1
2.3.10
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.3.9
2.4.0
2.4.0-RC1
2.4.1
2.4.2
2.4.3
2.4.4
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.5.8
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.7.0
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6