When taking over a Laravel system or WordPress site built by another company, you may start by running composer install in the project directory you received to get it working. If the files you received include the vendor directory, that action itself can be dangerous. Composer 2.11.3 and 2.2.33, released on November 24, fix a weakness in exactly this scenario. According to the advisory, it is not limited to composer install; even read-only commands such as composer show and composer validate are affected.
Composer itself is installed separately on developer machines, CI images and servers, apart from the dependency packages managed in the project's composer.lock. Updating the project's dependencies does not change the version of Composer itself. In this article, we lay out the fixes in the two November updates (2.11.2 and 2.2.32 on November 10, and 2.11.3 and 2.2.33 on November 24) based on the CHANGELOG of composer/composer, the fix commits and the advisories (GHSA) published in the repository, and summarize the affected scenarios and how to check.
Four releases in November
Composer updates the current 2.11 series and the 2.2 long-term support (LTS) series for older PHP in parallel. The release times recorded on Packagist are as follows.
| Release | Released (Packagist, UTC) | Security items in the CHANGELOG |
|---|---|---|
| 2.11.3 | November 24, 2026, 9:14 | 3 items (code execution via vendor, display of package descriptions, credentials in error output) |
| 2.2.33 | November 24, 2026, 9:11 | 3 items (same as above) |
| 2.11.2 | November 10, 2026, 9:09 | 7 items (command execution from composer.lock, zip extraction destination, credential send destination, etc.) |
| 2.2.32 | November 10, 2026, 9:09 | 4 items (zip extraction destination, credential send destination, etc.) |
For 2.11.2 and 2.2.32, the date in the CHANGELOG heading is November 11. However, the Packagist release time, GitHub Releases and the advisory publication in the repository are all November 10 (UTC), so this article uses November 10. The 2.11 series requires PHP 7.2.5 or later in composer.json. Environments that run Composer on older PHP will need to use the 2.2 series.
The advisories (GHSA) were published in the composer/composer repository a few minutes after each release (9:13 on November 10 and 9:19 on November 24, UTC). In terms of severity, GHSA-374h-4mh9-7rpm from November 24 is High. Of the November 10 advisories, GHSA-jhfp-4ppm-crmm and GHSA-w6hj-6587-3jh5 are High, and GHSA-x82q-x274-r6pq is Medium. On the other hand, as of November 26, the four November advisories had not yet appeared in the GitHub Advisory Database (github.com/advisories) or in Packagist's advisory list, and no CVE numbers had been assigned.
November 24 fix: code execution via a prepared vendor directory
The first item for 2.11.3 and 2.2.33 is as follows.
Security: Fixed arbitrary code execution when running Composer in a directory whose
composer.jsonand vendor directory were prepared by an attacker, a bypass of the CVE-2024-24821 fix (GHSA-374h-4mh9-7rpm)
Conditions stated in the advisory
The GHSA-374h-4mh9-7rpm advisory says you are affected when all three of the following conditions are met.
- Your Composer version is 2.2.23 to 2.2.32, or 2.7.0 to 2.11.2
- You run it in a project where someone else can modify or has prepared
composer.jsonand the vendor directory. Examples given include untrusted checkouts, pull requests built in CI, and directories shared with other users - You run it without either
--no-pluginsor--no-scripts
The advisory also says: “Any Composer command that loads the project is enough, including read-only ones such as composer list, validate, show or outdated.” On the other hand, it explains that it cannot be exploited remotely or through package installation. It assumes the attacker can prepare the contents of composer.json and vendor in the project being run.
The original 2024 weakness
CVE-2024-24821 (GHSA-7c6p-848j-wh5h, severity High) is a weakness disclosed in February 2024. The advisory explained that because running Composer loads files from the working directory, running it in a directory containing crafted files could execute code, and it listed the following three scenarios as especially dangerous.
- Running Composer with
sudo - Pipelines that run Composer on untrusted projects
- Shared environments where multiple developers each operate on the same project with Composer
With the fix at that time (2.7.0 and 2.2.23), Composer began checking with a regular expression, before loading vendor/composer/installed.php, that its contents are only an array listing versions.
The loophole fixed this time
Looking at the November 24 fix commit (baba7f7), there was a loophole in the processing after the check. Composer replaces __DIR__ in the installed.php that passed the check with the vendor directory path string before executing it. Because this replacement does not distinguish whether it is inside a string, crafting the vendor directory name made it possible to rewrite the code after it had passed the check.
The added test is an example that includes {${phpversion()}} in the vendor directory name and plants => __DIR__ . ' inside the installed.php string. After the fix, the code is checked again after the replacement and is not loaded if it fails. Because the vendor directory location can be set with config.vendor-dir in composer.json, the CHANGELOG says it applies when “both composer.json and vendor were prepared.”

How --no-plugins and --no-scripts help
As the advisory's conditions above indicate, runs with --no-plugins or --no-scripts are not affected by this issue. In the 2.11.3 and 2.2.33 source (Factory.php) as well, installed.php is loaded only when both plugins and scripts are enabled (the comment reads “load existing Composer\InstalledVersions instance if available and scripts/plugins are allowed, as they might need it”). We have not actually verified this behavior for this article.
However, these two options only prevent the November 24 issue. For GHSA-jhfp-4ppm-crmm from November 10, discussed later, the advisory says “--no-scripts and --no-plugins do not prevent it.”
The 2024 advisory also gave the following steps for running in an untrusted directory.
rm vendor/composer/installed.php vendor/composer/InstalledVersions.php
composer install --no-scripts --no-plugins
The other two issues from the same day
- Package descriptions, support links, license names and similar fields were being interpreted as console formatting markup. Invalid formatting tags could cause
show,licensesandaudit, and eveninstallandupdate, to fail (#13292 and #13293) - In environments where
curlis unavailable, credentials embedded in repository URLs appeared in download error messages (#13266 and #13267)
November 10 fix: values coming from composer.lock and installed.json
The fixes in 2.11.2 and 2.2.32 concentrate on places where Composer trusted too much the contents of files arriving from outside the project, such as composer.lock, vendor/composer/installed.json and downloaded zip files.
| CHANGELOG item (summary) | 2.11.2 | 2.2.32 |
|---|---|---|
Arbitrary command execution from prevent_url_access_callable in composer.lock or installed.json (GHSA-jhfp-4ppm-crmm, High) | Fix | Not affected (per the advisory) |
Writes outside the extraction destination via symbolic links in a zip, during extraction that falls back from unzip to ZipArchive (GHSA-w6hj-6587-3jh5, High) | Fix | Fix |
| Repository credentials sent to a mirror on another host written in composer.lock or installed.json (GHSA-x82q-x274-r6pq, Medium) | Fix | Fix |
Authorization and Cookie headers resent on redirects to a different origin | Fix | Fix |
Non-authentication settings loaded from the project's auth.json or COMPOSER_AUTH | Fix | Fix |
In addition, 2.11.2 includes a fix for the IP deny check happening after the request was sent (#13255) and an update to the bundled symfony/filesystem (GHSA-6prc-h956-hxjq).
In the diff of the first commit (f4f8ca8), prevent_url_access_callable and prevent_ip_access_callable are now removed from transport-options in the package information. The comment reads “these options are invoked as callables while downloading, so they must never be taken from externally provided package data such as the lock or installed.json”. The download process also throws an exception if either of these two is not Closure.
The three advisories describe the conditions for being affected as follows.
- GHSA-jhfp-4ppm-crmm: Applies to 2.10.0 to 2.11.1 when
composer installorupdateis run against acomposer.lockorinstalled.jsonwhose contents an attacker can change. 2.2 LTS and versions earlier than 2.10.0 are not affected. Example paths include pull requests that change onlycomposer.lock, templates that include a lock, a compromised dependency update bot, and a poisoned CI cache. The advisory says the most realistic case is CI that checks out a branch and runscomposer installwithout anyone reviewing the lock changes - GHSA-w6hj-6587-3jh5: Applies to 1.0.0 to 2.11.1 when packages are installed from a repository or mirror where an attacker can supply zip files, in an environment that has both the
unzipcommand and PHP's zip extension. The advisory says typical usage that installs only Packagist.org archives is not a realistic path - GHSA-x82q-x274-r6pq: Applies only to 2.11.0, 2.11.1 and 2.2.31, when HTTP headers containing credentials are written directly in the repository configuration and an attacker can change
composer.lockorinstalled.json
Behavior that changes with the update
The auth.json fix affects compatibility. According to the commit (02b85f1) description, the project's auth.json and the COMPOSER_AUTH environment variable are meant for credentials, and other settings are now ignored with a warning (except for the *-domains setting). config.home in the project's composer.json is also ignored, and you are directed to use the COMPOSER_HOME environment variable instead. If your CI puts non-authentication settings in COMPOSER_AUTH, check whether warnings appear after the update.
Likely affected scenarios (compiled by the editorial team from the advisories)
Based on the examples in the November advisories and the 2024 advisory, the following scenarios are worth checking first.
- Running a handed-over project as received. This is when you receive an archive or repository containing
vendorfrom a previous agency or a client and runcomposer installor similar commands in that directory. Running it before checking the contents counts as the “untrusted checkout” cited in the November 24 advisory - Processing pull request branches in CI. This is a pipeline that runs Composer directly on the branch in a repository where
composer.jsonandcomposer.lockcan be changed by pull requests. Both the November 24 advisory and the November 10 GHSA-jhfp advisory cite it as an example - Using
sudo composeron a shared server. The 2024 advisory listed this usage as high risk, and the impact widens when directories that other users can modify are involved
On the other hand, if only your own staff can modify project files and you do not commit vendor but rebuild it every time, the entry points for the November 24 issue are limited. However, the GHSA-jhfp advisory also lists paths where composer.lock is rewritten via dependency update bots or CI caches. It is safest to update Composer itself, including the November 10 release.
Steps to check (editorial suggestion)
- Check the Composer version in each environment. Run
composer --versionon developer machines, CI images (Docker images and setup steps that includecomposer) and production and staging servers, and confirm the version is 2.11.3 or later (2.2.33 or later for the 2.2 series). Because Composer itself is not listed in the project'scomposer.lock, we believe it does not show up in the results ofcomposer audit(editorial reading) - Update. Update a PHAR-installed Composer with
composer self-update. To pin to the 2.2 series in environments older than PHP 7.2.5, usecomposer self-update --2.2(confirmed in the option list in the official documentation and in the source). The official documentation saysself-updatemay not be available for Composer installed with an OS package manager. In that case, check the version of the OS package - Inspect received projects first. In directories you are not sure you can trust, delete
vendor/composer/installed.phpandInstalledVersions.php, then reinstall dependencies with--no-scripts --no-plugins. Also checkconfigincomposer.json(such asvendor-dir) andtransport-optionsincomposer.lock. Because these two options do not prevent GHSA-jhfp, upgrade Composer in steps 1 and 2 before running it - Check CI warnings. On the first run after the update, check for warnings that auth.json or
COMPOSER_AUTHsettings were ignored
Scope of verification
On November 26, 2026, we reviewed composer/composer's CHANGELOG.md (main and 2.2 branches), the tags 2.11.2, 2.11.3, 2.2.32 and 2.2.33, the diffs and tests of the fix commits (baba7f7, f4f8ca8, 648d769, 0b8179f, 02b85f1, 672eb25 and df59f6b),
Factory.phpandFilesystemRepository.phpin 2.11.3 and 2.2.33, the official documentation (doc/03-cli.md), Packagist's release timestamps and advisory list (API), and GHSA-7c6p-848j-wh5h (CVE-2024-24821) in github/advisory-database (desk research). On the same day, we checked the publication dates, severities, affected versions and conditions of the four advisories in the composer/composer repository (GHSA-374h, GHSA-jhfp, GHSA-w6hj and GHSA-x82q) via the GitHub API, and the release date of each version in the changelog on getcomposer.org. The four advisories are not yet listed in the GitHub Advisory Database and have no CVE numbers. We have not verified behavior by actually running Composer, reproduced each issue, or checked the versions in the official Docker images.
We covered updates for critical weaknesses in PHP itself in our article on PHP's unauthenticated RCE, an advisory for a Laravel admin panel component in our Filament Curator article, and WordPress's November update in our WordPress 7.1.5 article.
For reviews of PHP systems you have taken over or for planning updates including CI, please contact us via Development, AI and automation consultation.
References
- GHSA-374h-4mh9-7rpm (composer/composer advisory)
- GHSA-jhfp-4ppm-crmm (composer/composer advisory)
- GHSA-w6hj-6587-3jh5 (composer/composer advisory)
- GHSA-x82q-x274-r6pq (composer/composer advisory)
- Composer 2.11.3 changelog (getcomposer.org)
- composer/composer — CHANGELOG.md(main)
- composer/composer — CHANGELOG.md(2.2)
- composer/composer — commit baba7f7 (re-checking installed.php)
- composer/composer — Only read auth settings from auth.json/COMPOSER_AUTH(#13208)
- composer/composer — Escape package metadata before printing it to the console(#13292)
- Composer command documentation (doc/03-cli.md, self-update)
- composer/composer(Packagist)
- GHSA-7c6p-848j-wh5h(CVE-2024-24821)









