{ "id": "CVE-2021-29472", "sourceIdentifier": "security-advisories@github.com", "published": "2021-04-27T21:15:08.067", "lastModified": "2022-12-13T16:41:54.450", "vulnStatus": "Analyzed", "descriptions": [ { "lang": "en", "value": "Composer is a dependency manager for PHP. URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow code to be executed in the HgDriver if hg/Mercurial is installed on the system. 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 code execution. 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. Versions 1.10.22 and 2.0.13 include patches for this issue." }, { "lang": "es", "value": "Composer es un administrador de dependencias para PHP. Las URL de los repositorios de Mercurial en la root composer.json y las URL de descarga de la fuente del paquete no se sanean correctamente. Los valores de URL espec\u00edficamente dise\u00f1ados permiten que el c\u00f3digo se ejecute en HgDriver si hg/Mercurial est\u00e1 instalado en el sistema. El impacto para usuarios de Composer directamente es limitado ya que el archivo composer.json generalmente est\u00e1 bajo su propio control y las URL de descarga de origen solo pueden ser proporcionadas por repositorios de Composer de terceros en los que conf\u00edan expl\u00edcitamente para descargar y ejecutar el c\u00f3digo fuente, por ejemplo, complementos de Composer. El principal impacto es en los servicios que pasan la entrada del usuario a Composer, incluidos Packagist.org y Private Packagist. Esto permiti\u00f3 a usuarios activar la ejecuci\u00f3n remota de c\u00f3digo. La vulnerabilidad se ha corregido en Packagist. org y Private Packagist dentro de las 12 horas posteriores a la recepci\u00f3n del informe de vulnerabilidad inicial y, en base a una revisi\u00f3n de los registros, hasta donde sabemos, nadie abus\u00f3 de ella. Otros servicios y herramientas que usan VcsRepository/VcsDriver o derivados tambi\u00e9n pueden ser vulnerables y deber\u00edan actualizar su dependencia de compositor/compositor de inmediato. Las versiones 1.10.22 y 2.0.13 incluyen parches para este problema" } ], "metrics": { "cvssMetricV31": [ { "source": "nvd@nist.gov", "type": "Primary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH" }, "exploitabilityScore": 2.8, "impactScore": 5.9 }, { "source": "security-advisories@github.com", "type": "Secondary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH" }, "exploitabilityScore": 2.8, "impactScore": 5.9 } ], "cvssMetricV2": [ { "source": "nvd@nist.gov", "type": "Primary", "cvssData": { "version": "2.0", "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "accessVector": "NETWORK", "accessComplexity": "LOW", "authentication": "SINGLE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "baseScore": 6.5 }, "baseSeverity": "MEDIUM", "exploitabilityScore": 8.0, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false } ] }, "weaknesses": [ { "source": "security-advisories@github.com", "type": "Primary", "description": [ { "lang": "en", "value": "CWE-88" }, { "lang": "en", "value": "CWE-94" } ] } ], "configurations": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.10.22", "matchCriteriaId": "0DE98825-670B-465E-8ACC-70F7EFEFCABD" }, { "vulnerable": true, "criteria": "cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0", "versionEndExcluding": "2.0.13", "matchCriteriaId": "2427D469-77EA-48B0-9DC1-9BF56ACCE719" } ] } ] }, { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*", "matchCriteriaId": "DEECE5FC-CACF-4496-A3E7-164736409252" }, { "vulnerable": true, "criteria": "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*", "matchCriteriaId": "07B237A9-69A3-4A9C-9DA0-4E06BD37AE73" } ] } ] }, { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*", "matchCriteriaId": "E460AA51-FCDA-46B9-AE97-E6676AA5E194" }, { "vulnerable": true, "criteria": "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*", "matchCriteriaId": "A930E247-0B43-43CB-98FF-6CE7B8189835" } ] } ] } ], "references": [ { "url": "https://blog.sonarsource.com/php-supply-chain-attack-on-composer/", "source": "security-advisories@github.com", "tags": [ "Exploit", "Third Party Advisory" ] }, { "url": "https://getcomposer.org/", "source": "security-advisories@github.com", "tags": [ "Vendor Advisory" ] }, { "url": "https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx", "source": "security-advisories@github.com", "tags": [ "Third Party Advisory" ] }, { "url": "https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html", "source": "security-advisories@github.com", "tags": [ "Mailing List", "Third Party Advisory" ] }, { "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/", "source": "security-advisories@github.com", "tags": [ "Mailing List", "Third Party Advisory" ] }, { "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/", "source": "security-advisories@github.com", "tags": [ "Mailing List", "Third Party Advisory" ] }, { "url": "https://www.debian.org/security/2021/dsa-4907", "source": "security-advisories@github.com", "tags": [ "Third Party Advisory" ] } ] }