Socket flagged a Shai-Hulud descendant on RubyGems 70 seconds after it was publi...

@feross@infosec.exchange

Socket flagged a Shai-Hulud descendant on RubyGems 70 seconds after it was published. RubyGems removed it about five hours later, and we found no projects that depended on it.

strutil-core 1.0.1 ran the moment someone typed gem install. It declared a native extension, and RubyGems runs a native extension's extconf.rb during installation to generate a Makefile. This one downloaded the Bun runtime, ran a 5.48 MB credential stealer, then wrote a Makefile that does nothing so the install finished cleanly. Nothing had to require the gem.

Its installer is byte-for-byte the output of the worm's own RubyGems injector. Give that module a stolen RubyGems API key and it adds the same two files to every gem the key can publish, bumps the version, and pushes. The bundle also carries republishing code for npm and PyPI.

npm v12 and pnpm 10 now block install scripts by default. That was the right call, and it covers one ecosystem. RubyGems native extensions, Cargo build scripts, and Python packages built from source still run code before anyone imports anything. Attackers go wherever code still runs at install. Check what a package does before it gets that chance.

If you maintain gems, watch for patch releases you didn't cut that add an ext/*/extconf.rb. If a machine installed it, remove the net-health-checker monitor before you revoke the stolen GitHub token. Revoking it while the monitor runs deletes the home directory.

socket.dev/blog/shai-hulud-des