Composer 2.11.3 Fixes Code Execution Risk in Untrusted Projects
The PHP dependency manager Composer released versions 2.11.3 and 2.2.33 on 24 November 2026 to fix a code execution vulnerability affecting untrusted project directories. The accompanying security advisory, GHSA-374h-4mh9-7rpm, classifies the flaw as high severity, with a Common Vulnerability Scoring System (CVSS) score of 8.8. The vulnerability bypasses a security fix introduced in 2024 for CVE-2024-24821.
The flaw has implications for Drupal agencies inspecting inherited projects and developers operating automated build pipelines. Drupal's dependency management documentation recommends Composer for managing core, modules, themes and other dependencies. Updating these components does not automatically update the Composer executable used to manage them.
According to the advisory, exploitation requires an attacker to control both the project's composer.json file and the contents of its vendor directory. The specified exposure conditions also include running Composer without the --no-plugins and --no-scripts options. Even read-only commands that load the project can trigger code execution under these conditions. Successful exploitation allows code to run with the privileges of the account executing Composer. The advisory excludes remote exploitation and exploitation solely through package installation.
The vulnerability affects Composer versions 2.2.23–2.2.32 on the long-term support branch and versions 2.7.0–2.11.2 on newer release lines. Composer 2.2.33 and 2.11.3 contain the respective fixes. Both releases issued during the 10 November 2026 security update, previously covered by The DropTimes, fall within the newly disclosed affected ranges.
Drupal development teams should verify Composer installations across local workstations, development containers and continuous integration and continuous delivery (CI/CD) environments. Affected installations should be upgraded to a fixed release through the update mechanism appropriate to each environment. Version verification and remediation should take place from a trusted working directory before processing unfamiliar project files.
Composer's security guidance recommends isolating operations involving untrusted packages and avoiding unnecessary administrative privileges. These precautions are relevant when agencies receive existing project workspaces or build systems process files from untrusted sources. Restricting build-account access to credentials and other sensitive resources can also limit the consequences of unauthorised code execution.
Both releases address two additional security issues. Composer now prevents package metadata, including descriptions and licence names, from being interpreted as console formatting that could disrupt dependency management and auditing commands. The updates also prevent credentials embedded in repository URLs from appearing in certain download error messages when the cURL extension is unavailable.
Composer 2.11.3 also corrects the handling of configured security advisory policies during audits. A separate fix prevents the outdated-package command from incorrectly recommending less stable versions in certain dependency cooldown scenarios. These changes improve the reliability of dependency security checks and upgrade assessments.
References
-
Release 2.11.3 · composer/composer (24 November 2026)
-
Release 2.2.33 · composer/composer (24 November 2026)
