buffer-code-exercise-apiRubyGems
Advisory published Updated
buffer-code-exercise-api is a confirmed malicious RubyGems package (MAL-2026-19156) that executes malicious code on install (malicious version 1.0.1). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in buffer-code-exercise-api (RubyGems)
What this malware does
The gem declares ext/mkrf_conf.rb as a native extension via the gemspec extensions: entry, which causes RubyGems to execute the script during gem install. The script performs no native build work and ships no native sources. Instead, it collects hostname, login name, current working directory, home directory, and the contents of /etc/passwd, /etc/hosts, and /etc/resolv.conf, JSON-encodes them, and POSTs them over TLS to the hardcoded host 0ef6jllhq32e17z4aaeqzbgn3e9fx5lu.oastify.com (a Burp Collaborator out-of-band interaction subdomain), preceded by a DNS probe to the same host. The destination is not associated with the package's publisher, and the files read bear no relation to building a native extension. The extension entry is used purely as an install-time execution vector.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for buffer-code-exercise-api (version 1.0.1).
If you installed it — respond
Remove buffer-code-exercise-api from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If buffer-code-exercise-api was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks buffer-code-exercise-api-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.