# GHSA-9G4M-4WCW-XQHW: Malicious code in rate-limit-mini (RubyGems)

- Database: GitHub
- Malicious package: yes
- Published: 2026-10-05
- Modified: 2026-10-06

## Affected versions

- rate-limit-mini (RubyGems): 1.0.0
- rate-limit-mini (RubyGems): all versions
- rate-limit-mini (RubyGems): 1.0.1

## Description

## 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

Page: https://cve.now/GHSA-9G4M-4WCW-XQHW

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
