Rapid7 Vulnerability & Exploit Database

FreeBSD: VID-24A9BD2B-BB43-11EC-AF81-0897988A1C07 (CVE-2022-24828): Composer -- Command injection vulnerability

Free InsightVM Trial No Credit Card Necessary
Watch Demo See how it all works
Back to Search

FreeBSD: VID-24A9BD2B-BB43-11EC-AF81-0897988A1C07 (CVE-2022-24828): Composer -- Command injection vulnerability

Severity
7
CVSS
(AV:N/AC:M/Au:N/C:P/I:P/A:P)
Published
04/13/2022
Created
11/08/2022
Added
11/04/2022
Modified
11/04/2022

Description

Composer is a dependency manager for the PHP programming language. Integrators using Composer code to call `VcsDriver::getFileContent` can have a code injection vulnerability if the user can control the `$file` or `$identifier` argument. This leads to a vulnerability on packagist.org for example where the composer.json's `readme` field can be used as a vector for injecting parameters into hg/Mercurial via the `$file` argument, or git via the `$identifier` argument if you allow arbitrary data there (Packagist does not, but maybe other integrators do). Composer itself should not be affected by the vulnerability as it does not call `getFileContent` with arbitrary data into `$file`/`$identifier`. To the best of our knowledge this was not abused, and the vulnerability has been patched on packagist.org and Private Packagist within a day of the vulnerability report.

Solution(s)

  • freebsd-upgrade-package-php74-composer
  • freebsd-upgrade-package-php74-composer2
  • freebsd-upgrade-package-php80-composer
  • freebsd-upgrade-package-php80-composer2
  • freebsd-upgrade-package-php81-composer
  • freebsd-upgrade-package-php81-composer2

With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. No other tool gives us that kind of value and insight.

– Scott Cheney, Manager of Information Security, Sierra View Medical Center

;