# CVE-2022-24828: Missing input validation can lead to command execution in composer

- Severity: High 8.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.89%, higher than 80% of CVEs (2026-12-01)
- Published: 2022-04-13T21:00:22.000Z
- Modified: 2026-09-08T08:45:57.053Z
- Also known as: GHSA-x7cr-6qr6-2hh6, BIT-COMPOSER-2022-24828
- Weaknesses: CWE-20, CWE-88, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- composer composer: < 1.10.26; >= 2.0.0, < 2.2.12; >= 2.3, < 2.3.6
- composer/composer (Packagist): before 1.10.26; from 2.0 before 2.2.12; from 2.3 before 2.3.5
- getcomposer composer: before 1.10.26; from 2.0.0 before 2.2.12; from 2.3.0 before 2.3.5
- tenable tenable.sc: before 5.21.0
- fedoraproject fedora: 34; 35; 36
- composer (Bitnami): before 1.10.26; from 2.0.0 before 2.2.12; from 2.3.0 before 2.3.5

## Every score

- GitHub_M: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/composer/composer/security/advisories/GHSA-x7cr-6qr6-2hh6> (advisory, third-party-advisory, web)
- <https://github.com/composer/composer/commit/2c40c53637c5c7e43fff7c09d3d324d632734709> (advisory, patch, third-party-advisory, web)
- <https://www.tenable.com/security/tns-2022-09> (advisory, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QD7JQWL6C4GVROO25DTXWYWM6BPOPPCG/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GWT6LDSRY7SFMTDZWJ4MS2ZBXHL7VQEF/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/625MT3IKWKFVIWLSYZFSXHVUA2LES7YQ/> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24828> (advisory, web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2022-24828.yaml> (web)
- <https://github.com/composer/composer> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/625MT3IKWKFVIWLSYZFSXHVUA2LES7YQ> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GWT6LDSRY7SFMTDZWJ4MS2ZBXHL7VQEF> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QD7JQWL6C4GVROO25DTXWYWM6BPOPPCG> (web)

## Sources

- CVE List: [CVE-2022-24828](https://www.cve.org/CVERecord?id=CVE-2022-24828), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-x7cr-6qr6-2hh6](https://github.com/advisories/GHSA-x7cr-6qr6-2hh6), CC-BY-4.0, modified 2024-02-21
- NVD: [CVE-2022-24828](https://nvd.nist.gov/vuln/detail/CVE-2022-24828), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-COMPOSER-2022-24828](https://osv.dev/vulnerability/BIT-COMPOSER-2022-24828), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-24828 · Whole record: https://cve.day/CVE-2022-24828.json · Rebuilt by cve.day 2026-11-25T22:58:10.619Z
