Use of software with malware In web3-eth-utils
Description
The gem declares a native extension at ext/req_throttle_mini/extconf.rb but ships no C/C++/Rust sources, so the extension entry exists solely to force extconf.rb to run during gem install. Before calling mkmf/create_makefile, extconf.rb executes sandbox-evasion checks (CI env vars, generated usernames, hostname patterns, /tmp working directories, uptime under 30 minutes, absence of ~/.ssh, ~/.gitconfig, and ~/.gem/credentials) and only proceeds on hosts that look like real developer workstations. It then base64-decodes an opaque Ruby payload and, inside a double-forked detached child that sleeps for a randomized 20-40 minute delay, passes the decoded string to eval(). The decoded payload opens a TCP socket to 45.138.12.177:8089, spawns /bin/sh, and bridges the socket to the shell in a reconnect loop, yielding a persistent reverse shell under the installing user. The package name mimics the web3/eth ecosystem and lib/web3_eth_utils.rb is a trivial stub, consistent with a typosquat lure whose only functional effect is the install-time hook.
The OpenSSF Package Analysis project identified 'web3-eth-utils' @ 1.0.0 (rubygems) as malicious.
It is considered malicious because:
The package executes one or more commands associated with malicious behavior.
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Component | Affected version |
|---|---|---|
rubygems |
Aliases
References