Advisory

GHSA-47f6-5gq3-vx9c

Also known as: BIT-composer-2024-35241, CVE-2024-35241

Summary

Composer has a command injection via malicious git branch name

Details

Impact

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

2.2.24 for 2.2 LTS or 2.7.7 for mainline

Workarounds

Avoid installing dependencies via git by using --prefer-dist or the preferred-install: dist config setting.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-06-10 21:36 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

composer/composer

Packagist · All systems

Affected

  • introduced 2.0, fixed 2.2.24 (ecosystem)

Fixed versions

2.2.24

Fix

The export has no generic command for this ecosystem.

composer/composer

Packagist · All systems

Affected

  • introduced 2.3, fixed 2.7.7 (ecosystem)

Fixed versions

2.7.7

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences