MAL-2026-19156: Malicious code in buffer-code-exercise-api (RubyGems)

Published Nov 12, 2026
·
Updated

--- -= Per source details. Do not edit below this line.=-

Source: amazon-inspector (b575cb1f6c5f576af68398e3ad383942d6ec5f065456948bc51df018e7e0ab68) The gem declares ext/mkrfconf.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.

Affected Software

1 affected component
rubygems/buffer-code-exercise-api=1.0.1

Event History

Nov 12, 2026
Advisory Published
via OSV·03:51 PM
Data Sourced
via OSV·03:51 PM
DescriptionAffected Software

Frequently Asked Questions

1

When does the malicious activity occur?

It occurs during gem installation. RubyGems executes ext/mkrf_conf.rb because the gemspec declares it as a native extension.

2

What information can be exposed by installing the gem?

The script collects the hostname, login name, current working directory, home directory, and the contents of /etc/passwd, /etc/hosts, and /etc/resolv.conf. It JSON-encodes this data and sends it over TLS to a hardcoded external host.

3

Does exploitation require an application to load or use the gem after installation?

No. The install-time extension hook is the execution vector, so the script runs as part of gem install rather than requiring the gem to be loaded by an application.

4

How can teams determine whether an installation may have triggered the data transfer?

Review installation records for buffer-code-exercise-api and monitor DNS or TLS connections to 0ef6jllhq32e17z4aaeqzbgn3e9fx5lu.oastify.com. The script first performs a DNS probe and then POSTs collected data to that host.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203