| Title | Composerにおける複数の脆弱性 |
|---|---|
| Summary | ComposerはPHPの依存関係マネージャーです。バージョン1.0から2.2.26、および2.3から2.9.5には、Perforce::syncCodeBase()メソッドにコマンドインジェクションの脆弱性が存在します。このメソッドは$sourceReferenceパラメータを適切にエスケープせずにシェルコマンドに追加します。さらに、Perforce::generateP4Command()メソッドにも同様の脆弱性があり、ソースURLフィールドからユーザー提供のPerforce接続パラメータ(ポート、ユーザー、クライアント)を適切にエスケープせずに展開されます。攻撃者はPerforceがインストールされていなくても、特殊なシェルメタキャラクターを含む細工されたソースリファレンスまたはソースURL値を介して任意のコマンドを注入できます。ソースリファレンスとURLはパッケージメタデータの一部として提供されるため、侵害された、または悪意のあるComposerリポジトリがperforceをソースタイプとして宣言し、悪意のある値を含むパッケージメタデータを提供する可能性があります。この脆弱性は依存関係をソースからインストールまたは更新する際に悪用される可能性があり、dev接頭辞付きバージョンのインストール時のデフォルト動作を含みます。この問題はComposer 2.2.27および2.9.6で修正されました。開発者が即時にアップデートできない場合は、--prefer-distオプションやpreferred-install: distの設定を使用してソースからの依存関係インストールを回避し、信頼できるComposerリポジトリのみを使用することを推奨します。 |
| Possible impacts | 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 |
| Solution | 正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | April 15, 2026, midnight |
| Registration Date | April 27, 2026, 11:18 a.m. |
| Last Update | April 27, 2026, 11:18 a.m. |
| CVSS3.0 : 重要 | |
| Score | 8.8 |
|---|---|
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Composer |
| Composer 1.0.0 から 2.2.26 |
| Composer 2.3.0 から 2.9.5 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年04月27日] 掲載 |
April 27, 2026, 11:18 a.m. |
| Summary | Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::syncCodeBase() method, which appends the $sourceReference parameter to a shell command without proper escaping, and additionally in the Perforce::generateP4Command() method as in GHSA-wg36-wvj6-r67p / CVE-2026-40176, which interpolates user-supplied Perforce connection parameters (port, user, client) from the source url field without proper escaping. An attacker can inject arbitrary commands through crafted source reference or source url values containing shell metacharacters, even if Perforce is not installed. Unlike CVE-2026-40176, the source reference and url are provided as part of package metadata, meaning any compromised or malicious Composer repository can serve package metadata declaring perforce as a source type with malicious values. This vulnerability is exploitable when installing or updating dependencies from source, including the default behavior when installing dev-prefixed versions. This issue has been fixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline). If developers are unable to immediately update, they can avoid installing dependencies from source by using --prefer-dist or the preferred-install: dist config setting, and only use trusted Composer repositories as a workaround. |
|---|---|
| Publication Date | April 16, 2026, 6:17 a.m. |
| Registration Date | April 17, 2026, 4:12 a.m. |
| Last Update | April 26, 2026, 3:12 a.m. |
| Configuration1 | or higher | or less | more than | less than | |
| cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* | 1.0.0 | 2.2.26 | |||
| cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* | 2.3.0 | 2.9.5 | |||