ghsa-h5h8-pc6h-jvvx
Vulnerability from github
Published
2021-04-29 21:52
Modified
2022-08-11 00:19
Severity ?
Summary
Composer's missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial
Details
URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow commands to be executed in the HgDriver if hg/Mercurial is installed on the system.
Impact
- The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins.
- The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote command injection. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone.
- Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately
Patches
1.10.22 and 2.0.13 include patches for this issue.
{ "affected": [ { "package": { "ecosystem": "Packagist", "name": "composer/composer" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.10.22" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Packagist", "name": "composer/composer" }, "ranges": [ { "events": [ { "introduced": "2.0.0-alpha1" }, { "fixed": "2.0.13" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2021-29472" ], "database_specific": { "cwe_ids": [ "CWE-88", "CWE-94" ], "github_reviewed": true, "github_reviewed_at": "2021-04-27T20:33:49Z", "nvd_published_at": "2021-04-27T21:15:00Z", "severity": "HIGH" }, "details": "URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow commands to be executed in the HgDriver if hg/Mercurial is installed on the system.\n\n### Impact\n- The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins.\n- The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote command injection. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone.\n- Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately\n\n### Patches\n1.10.22 and 2.0.13 include patches for this issue.", "id": "GHSA-h5h8-pc6h-jvvx", "modified": "2022-08-11T00:19:18Z", "published": "2021-04-29T21:52:04Z", "references": [ { "type": "WEB", "url": "https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29472" }, { "type": "WEB", "url": "https://blog.sonarsource.com/php-supply-chain-attack-on-composer" }, { "type": "WEB", "url": "https://getcomposer.org" }, { "type": "WEB", "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2021-29472.yaml" }, { "type": "PACKAGE", "url": "https://github.com/composer/composer" }, { "type": "WEB", "url": "https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html" }, { "type": "WEB", "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE" }, { "type": "WEB", "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2" }, { "type": "WEB", "url": "https://www.debian.org/security/2021/dsa-4907" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "type": "CVSS_V3" } ], "summary": "Composer\u0027s missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial" }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.