Skip to main content
Menu
Advisories

Malicious code in req-throttle-mini (RubyGems)

GHSA-MVGR-WFJM-XR5VPublished Updated GitHubMalware

Description

Source: amazon-inspector (91bd1a5cb0c3bacb52c303b598c520dff6f40695affdb1643dd502cf3981d797)

The gem's native-extension script extconf.rb base64-decodes an embedded Ruby payload, writes it to a randomized file under the system temp directory, and spawns a detached ruby process on it before invoking mkmf's create_makefile. The decoded payload opens a TCP connection to the hardcoded bare IP 45.138.12.177 on port 8089 and bridges the socket bidirectionally to /bin/sh, giving the remote endpoint interactive command execution on the installing host. The payload loops with a 30-second sleep to re-dial on disconnect, providing persistent reconnection. The C2 destination is concealed as a base64 literal rather than appearing in plaintext, and the behavior is unrelated to any native build step.

---

Credit: OpenSSF (source)

Affected versions

References