GHSA-7xcx-6wjh-7xp2: Command Injection in standard-version
Noroxi değerlendirmesi
Öncelik: İzleyin (aksiyon skoru 0/100)
- İzlediğimiz kaynaklarda (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) herkese açık istismar kodu ya da sahada sömürü kaydı yok.
- Düzeltilmiş sürüm: standard-version (npm) 8.0.1.
Şimdilik düşük öncelik. standard-version (npm) 8.0.1 ya da daha yeni sürüme yükseltin.
Kaydın verisinden otomatik üretilir: CVSS (NVD ve CNA), CISA KEV ve SSVC, FIRST EPSS, istismar kaynakları, düzeltme sürümleri. Nasıl hesaplıyoruz
Birincil kaynaklar: OSV
# GitHub Security Lab (GHSL) Vulnerability Report: `GHSL-2020-111` The [GitHub Security Lab](https://securitylab.github.com) team has identified a potential security vulnerability in [standard-version](https://github.com/conventional-changelog/standard-version). ## Summary The `standardVersion` function has a command injection vulnerability. Clients of the `standard-version` library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. ## Product Standard Version ## Tested Version Commit [2f04ac8](https://github.com/conventional-changelog/standard-version/tree/2f04ac8fc1c134a1981c23a093d4eece77d0bbb9/) ## Details ### Issue 1: Command injection in `standardVersion` The following proof-of-concept illustrates the vulnerability. First install Standard Version and create an empty git repo to run the PoC in: ``` npm install standard-version git init echo "foo" > foo.txt # the git repo has to be non-empty git add foo.txt git commit -am "initial commit" ``` Now create a file with the following contents: ``` var fs = require("fs"); // setting up a bit of environment fs.writeFileSync("package.json", '{"name": "foo", "version": "1.0.0"}'); const standardVersion = require('standard-version') standardVersion({ noVerify: true, infile: 'foo.txt', releaseCommitMessageFormat: "bla `touch exploit`" }) ``` and run it: ``` node test.js ``` Notice that a file named `exploit` has been created. This vulnerability is similar to command injection vulnerabilities that have been found in other Javascript libraries. Here are some examples: [CVE-2020-7646](https://github.com/advisories/GHSA-m8xj-5v73-3hh8), [CVE-2020-7614](https://github.com/advisories/GHSA-426h-24vj-qwxf), [CVE-2020-7597](https://github.com/advisories/GHSA-5q88-cjfq-g2mh), [CVE-2019-10778](https://github.com/advisories/GHSA-4gp3-p7ph-x2jr), [CVE-2019-10776](https://github.com/advisories/GHSA-84cm-v6jp-gjmr), [CVE-2018-16462](https://github.com/advisories/GHSA-9jm3-5835-537m), [CVE-2018-16461](https://github.com/advisories/GHSA-7g2w-6r25-2j7p), [CVE-2018-16460](https://github.com/advisories/GHSA-cfhg-9x44-78h2), [CVE-2018-13797](https://github.com/advisories/GHSA-pp57-mqmh-44h7), [CVE-2018-3786](https://github.com/advisories/GHSA-c9j3-wqph-5xx9), [CVE-2018-3772](https://github.com/advisories/GHSA-wjr4-2jgw-hmv8), [CVE-2018-3746](https://github.com/advisories/GHSA-3pxp-6963-46r9), [CVE-2017-16100](https://github.com/advisories/GHSA-jcw8-r9xm-32c6), [CVE-2017-16042](https://github.com/advisories/GHSA-qh2h-chj9-jffq). We have written a [CodeQL](https://codeql.com) query, which automatically detects this vulnerability. You can see the results of the query on the `standard-version` project [here](https://lgtm.com/query/237522640229151035/). #### Impact This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input. #### Remediation We recommend not using an API that can interpret a string as a shell command. For example, use [`child_process.execFile`](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback) instead of [`child_process.exec`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback). ## Credit This issue was discovered and reported by GitHub Engineer [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh). ## Contact You can contact the GHSL team at `securitylab@github.com`, please include `GHSL-2020-111` in any communication regarding this issue. ## Disclosure Policy This report is subject to our [coordinated disclosure policy](https://securitylab.github.com/disclosures#policy).
- Yayın
- 13 Tem 2020
- Güncelleme
- 22 Eyl 2021
- EPSS
- —
- CWE
- CWE-77
Rapor araçları
Aksiyon skoru
0
Şimdilik düşük öncelik.
- CVSS
- 0 / 40 · —
- CISA KEV
- 0 / 30 · Listede değil
- EPSS
- 0 / 30 · —
Bu kayıt değişirse haber alın
- KEV'de değil: sahada sömürü kaydı yok
- Herkese açık istismar kodu kaydı yok
- Düzeltme yayımlandı
Bunlardan biri değişirse günlük e-posta özetinde haber veririz.
Sürümünüz etkileniyor mu? Kontrol edinNoroxi analizi
Sizin ortamınızda ne anlama geliyor?
Yukarıdaki değerlendirme kaydın verisinden otomatik üretilir; ortamınızı bilmez. Bu açığın sizde gerçekten sömürülebilir olup olmadığını ve hangi önlemin yeteceğini ekibimiz sizin sistemlerinizde doğrular.
Bu ürünü kullanıyoruz, yardım isteyinEtkilenen sistemler
Sürümünüz etkileniyor mu?
Ürünü seçip kullandığınız sürümü yazın. Bu kaydın sürüm aralıklarıyla tarayıcınızda karşılaştırılır; sürüm hiçbir yere gönderilmez.
| Üretici | Ürün | CPE |
|---|---|---|
| npm | standard-version | pkg:npm/standard-version |
Paket düzeyi etkilenme
OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.
| Ekosistem | Paket | Etkilenen aralık | Düzeltme |
|---|---|---|---|
| npm | standard-version | 8.0.1 öncesi | 8.0.1 |
Düzeltme
Hangi sürüme geçmeli
Üretici, paket deposu ve Microsoft kayıtlarından derlenen düzeltme sürümleri. Yükseltmeden önce üreticinin notunu doğrulayın.
| Ürün / paket | Düzeltilmiş sürüm | Kaynak |
|---|---|---|
| npm:standard-version | 8.0.1 | Paket deposu (OSV) |
İstismar durumu
Bilinen kamuya açık istismar yok
Şu an kamuya açık bir istismar görülmedi. Bu, güvende olduğunuz anlamına gelmez; yalnızca eşiğin biraz daha yüksek olduğunu gösterir.
Araştırma bağlamı
Pentester ve araştırmacı için: saldırı profili, puan anlaşmazlığı, zaman çizelgesi, yama commit’leri, kredi, varyant ve zincir adayları, bug bounty kapsamı. Hepsi mevcut veriden türetilir; istismar kodu içermez.
Zaman çizelgesi
Yayından bugüne: kavram kanıtı, Metasploit modülü, CISA KEV ve düzeltme kaydı. Tarihler kaynakların bildirdiği tarihlerdir.
Yayın dışında tarihli olay yok.
Bu kayıtta yok: EPSS geçmişi · yama commit'i ya da PR bağlantısı · araştırmacı kredisi · varyant ya da zincir adayı · herkese açık ödül programı.
Teknik detay
Bu kayıt için CVSS vektörü yok; saldırı koşulları çıkarılamıyor.
Saldırı bağlamı
Bu zafiyet sınıfının (CWE) MITRE CAPEC saldırı desenleri ve ATT&CK teknikleri. Tespit kuralı ve tehdit avı için başlangıç noktası.
Saldırı desenleri (CAPEC)
- LDAP InjectionCAPEC-136olasılık: High · High
- Command DelimitersCAPEC-15olasılık: High · High
- IMAP/SMTP Command InjectionCAPEC-183Medium
- Command InjectionCAPEC-248olasılık: Medium · High
- Manipulating Writeable Terminal DevicesCAPEC-40olasılık: High · Very High
- Exploiting Multiple Input Interpretation LayersCAPEC-43olasılık: Medium · High
- Manipulating Writeable Configuration FilesCAPEC-75olasılık: High · Very High
- Manipulating Web Input to File System CallsCAPEC-76olasılık: High · Very High
ATT&CK teknikleri
—
Değişiklik günlüğü (2)
- Düzeltme✗ → ✓
- CVSS5.5 → —
Takip ettiğiniz kayıtlarda bu değişiklikler bildirim olarak da gelir. →
Referanslar
Tüm referansları göster (2 daha)Daha az göster
Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.