VYPR

npm · Malicious package advisory

Malware

fast-url-utils

GHSA-4m8h-gfgm-v3gx

Malicious code in fast-url-utils (npm)

Details

**Severity:** Critical

**Affected versions:** `= 1.1.2`

## Source: amazon-inspector (dfe43baa179f806258b2dca8560148e23c136c2d9882a0755b977bb642364232)
The package is advertised as a pure JavaScript URL-parsing utility (parseUrl/buildUrl/getParams) but index.js unconditionally loads a platform-specific native addon at module load: `require('./native_win.node')` on win32, otherwise `./native.napi.node`. Neither binary contains URL-parsing logic; both are small loaders that extract a bundled 1,321,343-byte opaque file named `.napi_cache` (zero printable strings, i.e. encrypted/packed) to a staging location and execute it. The Windows loader references `%s\.napi_cache`, `%s.nc%lu.js`, and `node "%s"`, decrypting the blob to a staged.js file and spawning `node` on it. The Linux loader dynamically links `fork`, `setsid`, `execlp`, `chmod`, `fopen64`, and `fwrite`, performing the standard write-chmod-fork-setsid-exec daemonization sequence; the Windows loader uses `CreateProcessA` and `SetFileAttributesA` for the same drop-detach-execute flow, producing a session-detached child process that outlives the importing Node process. Both native binaries also embed broad sandbox-evasion gating: CI environment variable checks (GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, JENKINS_URL, BUILDKITE, CODEBUILD_BUILD_ID, APPVEYOR, SEMAPHORE, TEAMCITY_VERSION, BITBUCKET_BUILD_NUMBER, NOW_GITHUB_DEPLOYMENT, CF_BUILD_ID, SCREWDRIVER), container detection (/proc/1/cgroup, containerd, /proc/1/cmdline, dockerinit), and debugger/analysis-tool detection (TracerPid, IsDebuggerPresent, CheckRemoteDebuggerPresent, Process32First/Next, wireshark, httpdebug), so the dropper stays dormant on scanning infrastructure and only fires on real developer hosts. A URL-parsing library has no legitimate need for a native addon, an opaque multi-megabyte blob, daemonization primitives, or anti-analysis gating; the stated purpose is a cover story for an import-time dropper that executes attacker-chosen code on the installer with no network fetch required.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ( […]

**References:**
- https://github.com/ossf/malicious-packages/blob/15aa6bdb5089e6abbd3f2b5903b814669fa50738/osv/malicious/npm/fast-url-utils/MAL-2026-20556.json
- https://www.npmjs.com/package/fast-url-utils/v/1.1.1
- https://www.npmjs.com/package/fast-url-utils/v/1.1.2
- https://www.npmjs.com/package/fast-url-utils/v/1.1.3
- https://www.npmjs.com/package/fast-url-utils/v/1.1.4
- https://www.npmjs.com/package/fast-url-utils/v/1.1.5
- https://github.com/advisories/GHSA-4m8h-gfgm-v3gx

Compromised versions (1)

  • = 1.1.2

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.