gem · Malicious package advisory
Malwarerate-limit-mini
GHSA-9g4m-4wcw-xqhw
Malicious code in rate-limit-mini (RubyGems)
Details
**Severity:** Critical **Affected versions:** `= 1.0.0` ## Source: amazon-inspector (edfe870cadc07265c0d6144de3019e30aa801b82e20f54e2fd309cc1eae7e4d0) The gem's native extension script ext/extconf.rb base64-decodes an embedded Ruby payload, writes it to a randomly named file under the system temporary directory, and spawns it with the Ruby interpreter before invoking the normal mkmf build. The decoded payload opens a TCP connection to 45.138.12.177:8090 and bridges /bin/sh to the socket in a reconnect loop, giving a remote operator interactive shell access on the installer's host at `gem install` time. The use of a base64-encoded Ruby blob inside extconf.rb has no build-system purpose and serves to evade casual review. The package name presents as a benign rate-limiting utility, which is inconsistent with the shipped install-time behavior. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/7a674f02be3a0d93158ef0b6ee0a04edc5d547fa/osv/malicious/rubygems/rate-limit-mini/MAL-2026-17567.json)) **References:** - https://github.com/ossf/malicious-packages/blob/7a674f02be3a0d93158ef0b6ee0a04edc5d547fa/osv/malicious/rubygems/rate-limit-mini/MAL-2026-17567.json - https://rubygems.org/gems/rate-limit-mini/versions/1.0.0 - https://github.com/ossf/malicious-packages/blob/68375bfc9669351706a5a45c5039509f189d8e09/osv/malicious/rubygems/rate-limit-mini/MAL-2026-17567.json - https://safedep.io/rubygems-crypto-gems-install-time-reverse-shell - https://github.com/advisories/GHSA-9g4m-4wcw-xqhw
Compromised versions (1)
- = 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.