A git repository with a specially crafted branch name can run commands on your machine when you run certain Composer commands. This is command injection: Composer didn't handle the branch name safely when it used it in a command.
See the Composer advisory and the fixes for 2.7 and 2.2 LTS.
Who is affected
Anyone running composer/composer with packages installed from source, meaning cloned with git instead of downloaded as an archive, who then runs composer status, composer reinstall or composer remove. The attacker needs control of the git repository one of those packages was cloned from.
Packages installed as dist archives aren't exposed, which is why the workaround below works.
What to do
Update Composer to 2.7.7, or to 2.2.24 if you're on the 2.2 LTS line. If you can't update yet, the Composer team suggests not installing dependencies from git: use --prefer-dist or set preferred-install to dist in your Composer config.
A related advisory fixed in the same releases covers composer install run inside a cloned repository with crafted branch names.