# install-artifact-from-github loads downloaded native artifacts without integrity verification

install-artifact-from-github downloads prebuilt .node addons from an env-steerable mirror with no checksum or signature, letting an attacker-supplied binary execute on require().

- Payout: Research
- Severity: high
- Program: install-artifact-from-github
- Found by: ataberk-xyz
- Disclosed: 2026-11-18
- CVE: CVE-2026-73864
- Write-up quality: 7/10
- Original: https://github.com/advisories/GHSA-88q3-gch3-5396
- Library page: https://bugbountylibrary.com/r/ghsa%3AGHSA-88q3-gch3-5396
- Tags: area:oss domain:oss impact:integrity impact:rce kind:research platform:ghsa sev:high tech:nodejs technique:incomplete-fix technique:source-review vuln:misconfiguration vuln:rce

**Target:** npm package bin/install-from-cache.js native addon downloader
**Root cause:** The downloader writes the raw HTTP response body to the artifact path with no checksum, signature or SRI verification, and the mirror host is fully attacker-steerable via an env var with no host pinning or scheme enforcement.
**Steps:**
1. Set `RE2_DOWNLOAD_MIRROR` to an attacker-controlled host (plaintext http accepted).
2. Run `install-from-cache` with `--artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR`.
3. Observe the served bytes written verbatim to `build/Release/re2.node` (matching sha256), exit 0.
4. Consumer `require()`s the addon, executing its native module-init code.
**How found:** Source review of bin/install-from-cache.js: noticed the mirror URL is taken from an env var with no pinning, the write sink is a bare writeFile of the raw response body, and a grep for createHash|sha256|checksum|integrity|digest|signature found nothing; also noted isVerified() runs after the file is written and re2's verify-build requires the binary first.
**Exploitation:** Attacker sets or compromises the mirror env var (CI config, .npmrc, poisoned shell profile), tampers a GitHub release, or MITMs an http:// mirror or https→http redirect; the malicious .node is written to the artifact path and executes when the consumer requires it.
**Insight:** Post-download 'verify-build'/'npm test' hooks are not integrity gates when the verify script itself require()s the artifact — check ordering of load vs check, and grep install scripts for any hash/signature primitive before trusting a prebuilt-binary downloader.

