Unauthorized File Access in npm CLI before before version 6.13.3
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It fails to prevent access to folders outside of the intended node_modules folder through the bin field. A properly constructed entry in the package.json bin field would allow a package publisher to modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
- Yayın
- 12 Ara 2019
- Güncelleme
- 16 Haz 2026
- EPSS
- %3,4 · 88. yüzdelik
- CWE
- CWE-22
Takip etmek için giriş yap · Takip ettiğin kayıt KEV’e girer, istismarı çıkar ya da güncellenirse bildirim alırsın.
Rapor araçları
Aksiyon skoru
33
İzleyin
Şimdilik düşük öncelik.
- CVSS
- 32 / 40 · 8.1 / 10
- CISA KEV
- 0 / 30 · Listede değil
- EPSS
- 1 / 30 · %3,4
CNA ile NVD puanı
- NVD
- 8,1
- CNA · GitHub_M
- 7,7
- 0,4 puan fark
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
Kaydı açan otoritenin puanı ile NVD’nin bağımsız puanı. İki puan arasındaki fark ciddiyetin tartışmalı olduğunu gösterir.
Etkilenen sistemler
| Üretici | Ürün | CPE |
|---|---|---|
| npmjs | npm | cpe:2.3:a:npmjs:npm |
| opensuse | leap | cpe:2.3:o:opensuse:leap |
| oracle | graalvm | cpe:2.3:a:oracle:graalvm |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
| redhat | enterprise linux eus | cpe:2.3:o:redhat:enterprise_linux_eus |
Etkilenen sürümler
NVD sürüm aralıkları (katalogdaki ürünler için). Stack’ine sürümle eklersen eşleşme bunlarla yapılır.
- fedoraproject fedora31
- npmjs npm6.13.3 öncesi
- opensuse leap15.1
- oracle graalvm19.3.0.2
- redhat enterprise linux8.0
- redhat enterprise linux eus8.1
Üreticinin bildirdiği sürümler
Kaydı açan otorite (GitHub_M) tarafından bildirilen etkilenen sürüm aralıkları. NVD'nin CPE analizinden bağımsızdır ve genellikle ondan önce gelir.
npm cli
- < 6.13.3 ve sonrası · 6.13.3 öncesietkilenir
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 |
|---|---|---|---|
| AlmaLinux:8 | nodejs-nodemon | 1.18.3-1.module_el8.3.0+2047+b07ac28e öncesi | 1.18.3-1.module_el8.3.0+2047+b07ac28e |
| AlmaLinux:8 | nodejs-nodemon | 1.18.3-1.module_el8.3.0+2023+d2377ea3 öncesi | 1.18.3-1.module_el8.3.0+2023+d2377ea3 |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.3.0+2023+d2377ea3 öncesi | 17-3.module_el8.3.0+2023+d2377ea3 |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.4.0+2521+c668cc9f öncesi | 17-3.module_el8.4.0+2521+c668cc9f |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.4.0+2224+b07ac28e öncesi | 17-3.module_el8.4.0+2224+b07ac28e |
| Debian:12 | npm | 6.13.4+ds-2 öncesi | 6.13.4+ds-2 |
| npm | npm | 6.13.3 öncesi | 6.13.3 |
| openSUSE:Leap 15.1 | nodejs8 | 8.17.0-lp151.2.9.1 öncesi | 8.17.0-lp151.2.9.1 |
| Red Hat:enterprise_linux:8::appstream | nodejs | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 öncesi | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-debuginfo | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-debuginfo | 1:12.14.1-1.module+el8.1.0+5466+30f75629 öncesi | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-debugsource | 1:12.14.1-1.module+el8.1.0+5466+30f75629 öncesi | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-debugsource | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel | 1:12.14.1-1.module+el8.1.0+5466+30f75629 öncesi | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel-debuginfo | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-docs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 öncesi | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-docs | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c öncesi | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-nodemon | 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 öncesi | 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 |
| Red Hat:enterprise_linux:8::appstream | nodejs-packaging | 0:17-3.module+el8.1.0+3369+37ae6a45 öncesi | 0:17-3.module+el8.1.0+3369+37ae6a45 |
| Red Hat:enterprise_linux:8::appstream | npm | 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 öncesi | 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | npm | 1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c öncesi | 1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:rhel_e4s:8.0::appstream | nodejs | 1:10.19.0-1.module+el8.0.0+5738+1362a79c öncesi | 1:10.19.0-1.module+el8.0.0+5738+1362a79c |
+29
Aynı üründe
npmjs: tüm kayıtlarAynı birincil ürünün en yüksek skorlu diğer kayıtları.
- CVE-2021-43616The npm ci command in npm 7.x and 8.x through 8.1.3 proceeds with an installation even if dependency information in package-lock.json differ40Planlayın
- CVE-2022-29244npm packing does not respect root-level ignore files in workspaces31İzleyin
- CVE-2018-7408An issue was discovered in an npm 5.7.0 2018-02-21 pre-release (marked as "next: 5.7.0" and therefore automatically installed by an "npm upg31İzleyin
- CVE-2019-16777Arbitrary File Overwrite in npm CLI27İzleyin
- CVE-2020-15095Sensitive information exposure through logs in npm cli17İzleyin
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 |
|---|---|---|
| almalinux:nodejs-nodemon | 1.18.3-1.module_el8.3.0+2023+d2377ea3 · AlmaLinux:8 | Paket deposu (OSV) |
| almalinux:nodejs-packaging | 17-3.module_el8.4.0+2224+b07ac28e · AlmaLinux:8 | Paket deposu (OSV) |
| debian:npm | 6.13.4+ds-2 · Debian:12 | Paket deposu (OSV) |
| npm:npm | 6.13.3 | Paket deposu (OSV) |
| opensuse:nodejs8 | 8.17.0-lp151.2.9.1 · openSUSE:Leap 15.1 | Paket deposu (OSV) |
| red hat:nodejs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-debuginfo | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-debugsource | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-devel | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-devel-debuginfo | 1:10.19.0-1.module+el8.0.0+5738+1362a79c · Red Hat:rhel_e4s:8.0::appstream | Paket deposu (OSV) |
| red hat:nodejs-docs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-nodemon | 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:nodejs-packaging | 0:17-3.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:npm | 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Paket deposu (OSV) |
| red hat:rh-nodejs10-nodejs | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Paket deposu (OSV) |
| red hat:rh-nodejs10-nodejs-debuginfo | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Paket deposu (OSV) |
| red hat:rh-nodejs10-nodejs-devel | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Paket deposu (OSV) |
| rocky linux:nodejs-nodemon | 0:1.18.3-1.module+el8.3.0+101+f84c7154 · Rocky Linux:8 | Paket deposu (OSV) |
| rocky linux:nodejs-packaging | 0:17-3.module+el8.3.0+101+f84c7154 · Rocky Linux:8 | Paket deposu (OSV) |
| suse:nodejs10 | 10.18.0-1.15.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Paket deposu (OSV) |
| suse:nodejs12 | 12.15.0-1.6.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Paket deposu (OSV) |
| suse:nodejs6 | 6.17.1-11.30.1 · SUSE:OpenStack Cloud 7 | Paket deposu (OSV) |
| suse:nodejs8 | 8.17.0-3.25.1 · SUSE:Linux Enterprise Module for Web and Scripting 15 | 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.
FIRST EPSS günlük puanı; yalnızca 0,01 ve üstü değişimler kaydedilir (adım grafiği).
Yama ve commit bağlantıları
Referanslardaki commit, PR ve diff adresleri. Patch-diff ve varyant avı için başlangıç noktası; istismar değil, düzeltmedir.
Referanslarda commit ya da PR bağlantısı yok.
Kredi
Tüm araştırmacılarCNA kaydında adı geçen bulan, bildiren ve analistler. Ada tıkla, aynı araştırmacının diğer kayıtlarını gör.
CNA kaydında kredi yok.
Varyant adayları
Aynı üründe aynı zafiyet sınıfı, 18 ay içinde. Yama kök nedeni kapatmadıysa kardeş hata burada olur.
Gece hesaplanan ilişki yok.
Zincir adayları
Aynı üründe kimlik doğrulama atlatma ile yetki isteyen bir açık kısa aralıkla yayımlanmış: birlikte kimlik doğrulamasız bir yola dönüşebilir.
—
Bug bounty kapsamı
Bilinen herkese açık program yok.
Kaynak: bounty-targets-data (HackerOne, Bugcrowd, Intigriti, YesWeHack herkese açık listeleri).
Teknik detay
Saldırı koşulları
- İnternetten erişebilen herkes tetikleyebilir.
- Düşük yetkili bir hesap yeterli.
- Kullanıcının bir şey yapması gerekmez.
- Özel bir koşul gerekmez; tekrarlanabilir.
Başarılı olursa
- Gizlilik
- yüksek · veriler okunabilir
- Bütünlük
- yüksek · veri ya da yapılandırma değiştirilebilir
- Erişilebilirlik
- yok
- Saldırı vektörü
- Ağ
- Karmaşıklık
- Düşük
- Gereken yetki
- Düşük
- Kullanıcı etkileşimi
- Gerekmez
- Kapsam
- Değişmez
- Gizlilik etkisi
- Yüksek
- Bütünlük etkisi
- Yüksek
- Erişilebilirlik etkisi
- Yok
Zayıflık sınıfı (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vektörü
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
nvd-primary
Kök neden
Kullanıcının verdiği dosya adı izin verilen klasörle birleştiriliyor, ama sonucun hâlâ o klasörün içinde olup olmadığı kontrol edilmiyor.
Hatanın kod karşılığı
CWE-22 sınıfının tamamıBu zafiyet sınıfının temsili örneği. Üreticinin kaynak kodu değildir; hatalı kalıbı ve düzeltmesini gösterir.
Hatalı
const file = path.join(ROOT, req.query.name);res.sendFile(file);Düzeltilmiş
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) { return res.sendStatus(400);}res.sendFile(file);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)
- Path TraversalCAPEC-126olasılık: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64olasılık: High · High
- Manipulating Web Input to File System CallsCAPEC-76olasılık: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78olasılık: High · High
- Using Slashes in Alternate EncodingCAPEC-79olasılık: High · High
ATT&CK teknikleri
—
Noroxi analizi
Bu kayıt için henüz Noroxi analizi yok
385 binden fazla zafiyetin tamamına elle analiz yazmıyoruz; bu dürüst olmazdı. Öne çıkan ve sahada etkisi olan zafiyetler için mekanizma, tespit ve kapatma adımlarını ekibimiz yazıyor.
Bu ürünü kullanıyoruz, yardım isteyinDeğişiklik günlüğü
- Düzeltme✗ → ✓
Takip ettiğiniz kayıtlarda bu değişiklikler bildirim olarak da gelir. →
Referanslar
- lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html
- access.redhat.com/errata/RHEA-2020:0330
- access.redhat.com/errata/RHSA-2020:0573
- access.redhat.com/errata/RHSA-2020:0579
- access.redhat.com/errata/RHSA-2020:0597
- access.redhat.com/errata/RHSA-2020:0602
- blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
- www.oracle.com/security-alerts/cpujan2020.html
Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.