{"vuln_id":"GHSA-88q3-gch3-5396","aliases":["CVE-2026-73864"],"description":"install-artifact-from-github loads downloaded native artifacts without integrity verification","published_at":"2026-11-18T21:17:37Z","modified_at":"2026-11-18T21:17:37Z","first_seen_at":"2026-11-21T19:15:20.145630Z","severity":"high","severity_source":"ghsa","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-494"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-88q3-gch3-5396"},"matched_alias":null,"items":[{"id":2431,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-88q3-gch3-5396 / CVE-2026-73864: install-artifact-from-github loads downloaded native artifacts without integrity verification","summary":"install-artifact-from-github loads downloaded native artifacts without integrity verification\n\n## Description\n\n`bin/install-from-cache.js` downloads a prebuilt native addon (`*.node`) over the network and writes it directly to the artifact path **with no cryptographic integrity verification of any kind** — no checksum manifest, no signature, no SRI. A scan of the whole package for `createHash|sha256|checksum|integrity|digest|signature` finds nothing. The file is then `require()`-loaded by the consumer, which executes the addon's native module-init code. Anyone able to influence the download achieves code execution on the installing machine.\n\n### Affected code (v1.6.0)\n\n- **Mirror is fully attacker-steerable via an env var, no host pinning** — `bin/install-from-cache.js:80`:\n  ```js\n  let assetUrl = mirrorHost || process.env[mirrorEnvVar] || 'https://github.com';\n  ```\n  `re2` passes `--host-var RE2_DOWNLOAD_MIRROR`, so setting `RE2_DOWNLOAD_MIRROR` (CI config, `.npmrc`/env passthrough, a compromised CI job, a poisoned shell profile) redirects 100% of the download to an arbitrary host with zero pinning.\n\n- **The write sink is a bare `writeFile`, no verification** — `bin/install-from-cache.js:185-187`:\n  ```js\n  const write = async (name, data) => {\n    await fsp.mkdir(path.dirname(name), {recursive: true});\n    await fsp.writeFile(name, data);   // `data` is the raw HTTP response body\n  };\n  ```\n\n- **Cleartext transfer + silent protocol downgrade on redirect** — `bin/install-from-cache.js:155,165`:\n  ```js\n  const httpLib = isHttps.test(url) ? https : isHttp.test(url) ? http : null;   // http:// supported\n  ...\n  get(res.headers.location).then(resolve, reject);   // re-derives protocol from the NEW url\n  ```\n  An `https://` asset that 302-redirects to `http://` is followed and fetched over plaintext, no warning, no scheme pinning, no redirect cap.\n\n### The post-download \"verification\" is not an integrity gate\n\n`isVerified()` optionally runs `npm run verify-build` / `npm test` *after* writing the file. For `re2`, `scripts/verify-build.js` `require()`s the binary as its first line — i.e. the downloaded addon's native code has **already executed** by the time any check runs. It is a functional smoke test, not an integrity gate, and it is skipped entirely when any `npm_config_platform*` env var is set (`:120-122`).\n\n## Proof of concept\n\nA self-contained, **non-malicious** PoC (`poc.js`) proves the missing-integrity property against the real `install-from-cache`, without shipping a weaponized binary: it stands up a plaintext-HTTP \"mirror\" serving a sentinel payload, runs `install-from-cache` with `RE2_DOWNLOAD_MIRROR` pointed at it, and shows the served bytes are written **verbatim** to `build/Release/re2.node`:\n\n```\nnpm i install-artifact-from-github\nIAFG_BIN=./node_modules/install-artifact-from-github/bin/install-from-cache.js node poc.js\n```\n```\nattacker mirror (plaintext http) on 127.0.0.1:PORT\n  [mirror] served 2083 attacker bytes over HTTP for /uhop/node-re2/releases/download/1.24.1/darwin-arm64-137\nWriting to build/Release/re2.node ... Do\n\nAffected packages: npm:install-artifact-from-github\nPatched: install-artifact-from-github 1.7.0","url":"https://github.com/advisories/GHSA-88q3-gch3-5396","published_at":"2026-11-18T21:17:37Z","updated_at":"2026-11-18T21:17:37Z","fetched_at":"2026-11-21T19:15:18.416831Z","severity":"high","cvss_score":7.5,"epss":0.00199,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"install-artifact-from-github","vuln_id":"CVE-2026-73864","vuln_ids":["CVE-2026-73864","GHSA-88Q3-GCH3-5396"],"tags":["ghsa","npm","CWE-494"],"cluster_id":2294,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2431","html":"https://vulnwatch.ve1ve2.com/item/2431"}},{"id":8163,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-73864: install-artifact-from-github installs prebuilt native artifacts hosted by GitHub without compiling them locally. Prior to 1.7.0, bin/install-from-cache.js down…","summary":"install-artifact-from-github installs prebuilt native artifacts hosted by GitHub without compiling them locally. Prior to 1.7.0, bin/install-from-cache.js downloads a native .node artifact, allows RE2_DOWNLOAD_MIRROR to select a source, follows HTTP redirects including HTTPS-to-HTTP downgrades, and writes the decompressed response to the artifact path without cryptographic integrity verification before writing or loading it. An attacker who controls a configured mirror, replaces a release asset, or can modify plaintext transport can supply native code that executes when the consumer loads the artifact. Version 1.7.0 adds SHA-256 verification for default-GitHub-source downloads when the consuming package publishes an artifactHashes bag; configured mirrors and packages without a bag remain outside that verification.\n\nReferences:\nhttps://github.com/uhop/install-artifact-from-github/commit/1d2d8637556a03f6235e50fe0c238c6dce291633\nhttps://github.com/uhop/install-artifact-from-github/releases/tag/1.7.0\nhttps://github.com/uhop/install-artifact-from-github/security/advisories/GHSA-88q3-gch3-5396\nhttps://github.com/uhop/install-artifact-from-github/security/advisories/GHSA-88q3-gch3-5396","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73864","published_at":"2026-11-18T19:18:08.043000Z","updated_at":"2026-11-19T15:17:42.163000Z","fetched_at":"2026-11-21T19:15:31.483964Z","severity":"high","cvss_score":7.5,"epss":0.00199,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-73864","vuln_ids":["CVE-2026-73864","GHSA-88Q3-GCH3-5396"],"tags":["CWE-494"],"cluster_id":1105,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8163","html":"https://vulnwatch.ve1ve2.com/item/8163"}}]}