Togoder security

npm package security report

@tybys/wasm-util@0.10.4 security report

Risky patterns found that deserve a look.

Needs review Version 0.10.4 Files reviewed 30 Size 688.5 KB Scanned

Summary

Togoder Security scanned the npm package @tybys/wasm-util@0.10.4 on Oct 6, 2026. An AI review of 30 source files produced 2 medium, 10 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.

0
critical
0
high
2
medium
10
low

Findings 12

medium

Insecure random number generation

NPS-538435DF52B0

When the WASI memory is backed by a SharedArrayBuffer, the random_get implementation falls back to Math.random() instead of crypto.getRandomValues. Math.random() is not cryptographically secure and would make random_get deterministic/predictable. This is a security weakness but appears to be a legitimate workaround for the inability to use crypto.getRandomValues on SharedArrayBuffer-backed views in some environments.

lib/cjs/wasi/preview1.js
medium

Dynamic Module Require

NPS-6EE0626D78BD

The code contains logic that dynamically resolves a native require function, attempting to bypass bundlers via __non_webpack_require__ and __webpack_public_path__. While this is often used for legitimate compatibility with bundlers, it is also a common technique in malicious or obfuscated packages to hide module loading from static analysis.

lib/cjs/wasi/util.js:70
low

Host OS Detection

NPS-AEF37515FBC4

The code checks process.platform === 'win32' to route path resolution to a Windows-specific implementation. This is benign platform detection necessary for correct path handling and does not involve any suspicious activity.

lib/cjs/wasi/path.js:21
low

Environment Variable Read

NPS-A156C20CADAA

The code reads the process.env object to look up the per-drive current working directory (=X: environment variable convention) on Windows. This is standard behavior used by Node.js's built-in path.win32.resolve to support Windows drive-specific working directories, and the values read are only used locally for path resolution, not exfiltrated.

lib/cjs/wasi/path.js:68
low

Browser environment coupling / prompt for stdin

NPS-E5BE13564154

In the browser fallback, fd_read for fd 0 uses window.prompt() to read stdin. This is legitimate for browser WASI usage but means the library interacts with the page context. It only runs when fd_read(0, ...) is called at runtime, not at import time.

lib/cjs/wasi/preview1.js
low

process.exit invocation

NPS-8639111BE381

proc_exit calls process.exit(rval) when running under Node. This is expected WASI semantics (proc_exit is supposed to terminate), not a backdoor, but it does terminate the host process on guest request, which callers should be aware of.

lib/cjs/wasi/preview1.js
low

Dynamic capability via asyncify/webassembly

NPS-3A61C250C4CB

The module wires WASI syscalls to Node's fs/promises and supports asyncify or JSPI wrapping. This is the intended design of a WASI preview1 implementation. No obfuscated code, eval, child_process, or network access was observed.

lib/cjs/wasi/preview1.js
low

Worker Thread Interaction

NPS-57DBCF7B3B84

The code conditionally loads worker_threads and defines a postMessage implementation that sends data to parentPort. This is expected behavior for a WASI utility library but could be abused for data exfiltration if the data originates from sensitive sources.

lib/cjs/wasi/util.js:82
low

Environment variable access

NPS-F88D66A6D658

Reads process.env for per-drive cwd lookups using the '=X:' convention. This is legitimate Windows path resolution behavior for determining current working directory per drive, not credential harvesting.

lib/mjs/wasi/path.mjs
low

Computed property definition

NPS-01C0A52FD59F

wrapInstanceExports uses Object.defineProperty on arbitrary export names from the provided exports object. No external input is involved here, but it is a pattern worth noting for WASI module wrapping.

lib/mjs/wasi/util.mjs:58
low

Dynamic module loading

NPS-A2F4914A01B0

The code attempts to obtain a native require function via __webpack_public_path__ and __non_webpack_require__, then uses it to load the 'worker_threads' module. While the target module is hardcoded, this pattern bypasses webpack bundling and can be used to load arbitrary modules in some environments.

lib/mjs/wasi/util.mjs:67
low

Potential worker thread interaction

NPS-C2A09C64A65F

The module conditionally spawns or interacts with worker_threads, including reading isMainThread and using parentPort.postMessage to send data to the main thread. This is legitimate for WASI threading support but constitutes inter-thread communication that could be abused if the package is compromised.

lib/mjs/wasi/util.mjs:87

Files reviewed

FileVerdictWhat the reviewer saw
lib/cjs/wasi/preview1.js medium This is a legitimate WASI preview1 implementation for WebAssembly; it contains no exfiltration, credential harvesting, obfuscation, shell spawning, or network calls, with only minor security notes about a Math.random fallback for random_get on SharedArrayBuffer memory and expected process.exit/prompt usage.
lib/cjs/wasi/util.js medium The file contains dynamic module requiring logic that could bypass bundler analysis, but no outright malicious behavior like data exfiltration, credential harvesting, or backdoor installation was detected.
lib/mjs/wasi/util.mjs medium The file contains only utility validation functions and environment detection; no clearly malicious behavior, but it uses non-standard dynamic require access and worker_threads communication that warrant low-severity scrutiny.
lib/cjs/asyncify.js safe No malicious patterns detected; the code is a legitimate WebAssembly Asyncify utility with no data exfiltration, credential harvesting, obfuscation, or process execution.
lib/cjs/index.js safe No malicious patterns detected; the file only re-exports local modules and contains no dynamic execution, network, filesystem, or process activity.
lib/cjs/jspi.js safe No malicious patterns detected; the code only provides WebAssembly function wrapping utilities for JSPI without any network, filesystem, process, or dynamic code execution behavior.
lib/cjs/load.js safe The code is a WebAssembly loader utility with no malicious patterns; all network and filesystem-like operations are limited to fetching a developer-provided WASM URL.
lib/cjs/memory.js safe No malicious patterns detected
lib/cjs/wasi/error.js safe Cleared by Jev triage; no further analysis needed
lib/cjs/wasi/fd.js safe No malicious patterns detected; the file implements WASI file descriptor table logic with no network, credential, obfuscation, or process-spawning behavior.
lib/cjs/wasi/fs.js safe No malicious patterns detected
lib/cjs/wasi/index.js safe No malicious patterns detected; the code is a legitimate WASI implementation with standard option validation and instance management.
lib/cjs/wasi/path.js safe The file implements POSIX/Windows path resolution utilities (resolve, relative) with standard Node.js-compatible logic; it reads process.env only to look up Windows per-drive cwd conventions and contains no malicious patterns such as network calls, file system access, code execution, or credential harvesting.
lib/cjs/wasi/rights.js safe No malicious patterns detected; this file defines WASI filesystem rights constants and a pure getRights() function with no network, process, filesystem, or dynamic code execution behavior.
lib/cjs/wasi/types.js safe No malicious patterns detected
lib/cjs/webassembly.js safe No malicious patterns detected; the code only provides a WebAssembly environment abstraction with a support check.
lib/mjs/asyncify.mjs safe This is a legitimate WebAssembly Asyncify helper module with no malicious patterns such as data exfiltration, credential harvesting, dynamic code execution, or suspicious network/file system activity.
lib/mjs/index.mjs safe Cleared by Jev triage; no further analysis needed
lib/mjs/jspi.mjs safe No malicious patterns detected; the code only wraps WebAssembly functions without network, filesystem, or process access.
lib/mjs/load.mjs safe No malicious patterns detected; the module performs standard WebAssembly instantiation and loading via fetch without any exfiltration, obfuscation, or system manipulation.
lib/mjs/memory.mjs safe No malicious patterns detected; the code is a straightforward WebAssembly Memory wrapper with no exfiltration, credential harvesting, obfuscation, or other security concerns.
lib/mjs/wasi/error.mjs safe Cleared by Jev triage; no further analysis needed
lib/mjs/wasi/fd.mjs safe No malicious patterns detected; this file implements WASI file descriptor tables and standard output buffering without external network, process, or credential access.
lib/mjs/wasi/fs.mjs safe Cleared by Jev triage; no further analysis needed
lib/mjs/wasi/index.mjs safe No malicious patterns detected; the code is a legitimate Node.js WASI implementation with standard validation and no exfiltration, obfuscation, or dynamic code execution.
Show 5 more files
FileVerdictWhat the reviewer saw
lib/mjs/wasi/path.mjs safe This is a clean implementation of Node.js-compatible path resolution (resolveWin32, resolve, relative) with standard filesystem path logic and no malicious patterns detected.
lib/mjs/wasi/preview1.mjs safe This is a legitimate WASI preview1 syscall implementation from a third-party package with no malicious patterns detected.
lib/mjs/wasi/rights.mjs safe Cleared by Jev triage; no further analysis needed
lib/mjs/wasi/types.mjs safe No malicious patterns detected
lib/mjs/webassembly.mjs safe No malicious patterns detected

Affected version ranges

None of the 2 scanned versions of @tybys/wasm-util are flagged high or critical. The latest scanned version, 0.10.4, is medium risk. Only versions we have scanned are listed; unscanned versions between them are not covered.

0.9.00.10.4
VersionsVerdictCountRangeTop findings
0.10.4 Needs review 1 0.10.4 Dynamic Module Require; Insecure random number generation
0.10.3 Not scanned 1 0.10.3
0.10.2 Needs review 1 0.10.2 Path Traversal / Sandbox Escape Risk; Weak Random Number Generation
0.9.0 โ€“ 0.10.1 Not scanned 2 >=0.9.0 <=0.10.1

Full list, including published versions not scanned yet: version ranges API.

Scanned versions of @tybys/wasm-util

VersionVerdictFilesScanned
0.10.4 Needs review 30 Oct 6, 2026
0.10.2 Needs review 30 Oct 6, 2026

Frequently asked questions

Is @tybys/wasm-util safe to use?

No confirmed malware was found in @tybys/wasm-util@0.10.4, but the review flagged 2 medium, 10 low severity findings for risky patterns worth checking before you rely on it.

Does @tybys/wasm-util contain malware?

No malware was identified in @tybys/wasm-util@0.10.4 when Togoder Security scanned it on Oct 6, 2026. A new version can still introduce malicious code, so scan the exact versions in your lockfile.

How was @tybys/wasm-util checked?

Togoder Security downloaded the published npm package and had an AI model read its 30 source files, looking for install scripts, credential access, network exfiltration, obfuscation, backdoors and crypto-wallet theft. The results are cached by file hash and shown here.

How do I scan @tybys/wasm-util together with the rest of my dependencies?

Upload your lockfile at https://security.togoder.click/scan or call the API documented at https://security.togoder.click/api-docs. Files that have already been scanned, like the ones in @tybys/wasm-util@0.10.4, cost nothing.

Related security reports