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

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.

Published: 2022-04-13 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-24828 is rated Moderate Risk (48.4/100): CVSS High severity, with low exploitation likelihood (EPSS 0.21%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-24828

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-28 0.28% 0.21% -0.07%
2 2026-05-27 0.23% 0.28% +0.05%
3 2026-05-20 0.23%

Full EPSS history (29 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-24828

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.3 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.6 6.0 [email protected]
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 5.9 [email protected]
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2022-24828

GitHub Security Advisory for CVE-2022-24828

GHSA-x7cr-6qr6-2hh6 · Severity: high · Ecosystem: composer — Missing input validation can lead to command execution in composer

OS Trackers for CVE-2022-24828

vendor priority summary link
alpine high CVE-2022-24828: 1 source package rows (composer); 11 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 7, open 4. https://security.alpinelinux.org/vuln/CVE-2022-24828
debian not yet assigned CVE-2022-24828 not yet assigned priority: Debian including 1 source packages (composer), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-24828
gentoo normal CVE-2022-24828: 1 GLSA(s) (202508-06), 1 atom(s) (dev-php/composer); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-24828
suse high CVE-2022-24828 severity important: SUSE including 7 source package names (8-4.1:php-composer2-2.2.3-150400.3.3.1, latest:php-composer2-2.2.3-150400.3.3.1, …), 15 product×package rows across 11 product lines (Container bci/php, Container bci/php-apache, … (11 product lines)): Fixed 15. https://www.suse.com/security/cve/CVE-2022-24828/
ubuntu medium CVE-2022-24828 medium priority: Ubuntu including 1 source packages (composer), 14 status rows across 14 suites (bionic, focal, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): released 5, ignored 4, not-affected 4, DNE 1. https://ubuntu.com/security/CVE-2022-24828

Affected software / configurations for CVE-2022-24828

Vendor Product Version Raw CPE
getcomposer composer < 1.10.26 cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
getcomposer composer >= 2.0.0, < 2.2.12 cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
getcomposer composer >= 2.3.0, < 2.3.5 cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
tenable tenable.sc < 5.21.0 cpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*

References for CVE-2022-24828

cvelogic Threat Intelligence