VYPR

npm · Malicious package advisory

Malware

qs-native-parse

MAL-2026-20557

Malicious code in qs-native-parse (npm)

Details


---
_-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (9d7a59ef9bedd72e64eb405d63a5037689bea25b38544a988f49ee1953d2d633)
[email protected] presents itself as a pure-JavaScript query-string parser (package.json main=index.js, keywords 'querystring,qs,parse,stringify,url') but silently bundles two prebuilt native addons (native.napi.node for Linux, native_win.node for Windows) and a 3.7MB opaque sibling file named.napi_cache. index.js loads the platform-appropriate.node binary on module load inside a try/catch that swallows any error, so failures are hidden from the caller. The native addons contain format strings and syscalls consistent with staging and executing a decrypted JavaScript payload from the.napi_cache blob (strings '%s/.napi_cache', '%s.nc%lu.js', '/tmp/.%u', 'node "%s"'; imports fork, setsid, chmod, execlp) — i.e., the addon writes a derived.js file to /tmp and spawns node on it outside the Node module loader, bypassing any JS-level inspection. Both addons additionally gate execution on anti-analysis checks: the Linux variant enumerates CI environment variables (GITHUB_ACTIONS, GITLAB_CI, TRAVIS, CIRCLECI, JENKINS_URL, BUILDKITE, CODEBUILD_BUILD_ID, APPVEYOR, SEMAPHORE, TEAMCITY_VERSION, BITBUCKET_BUILD_NUMBER, NETLIFY, VERCEL, NOW_GITHUB_DEPLOYMENT, CF_BUILD_ID, SCREWDRIVER, SANDBOX), inspects /proc/1/cgroup for docker/containerd/kubepod/podman markers, reads /proc/self/status for TracerPid and /proc/self/maps; the Windows variant calls IsDebuggerPresent/CheckRemoteDebuggerPresent and checks for wireshark/httpdebug. No binding.gyp, C/C++/Rust sources, install script, or documentation of a native component is shipped, so there is no legitimate build artifact these binaries correspond to. The combination of undocumented native code, an opaque encrypted payload decrypted and exec'd via node on require(), swallowed load errors, and sandbox/CI/debugger evasion is the obfuscated-loader dropper shape and executes attacker-controlled code on the installer's host as soon as the module is required.

Compromised versions (2)

  • 1.0.0
  • 1.0.1

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