MAL-2026-20211: Malicious code in gmo-payment (RubyGems)

Published Nov 19, 2026
·
Updated

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

Source: amazon-inspector (4536bede455c58b0be6819cbc85b4566d1c567bfedc370aac7f97a3aacc9776b) The gem ships a native-extension build script (extconf.rb) that runs automatically during gem install. It collects host identifiers (hostname, whoami, uname output, working directory, local IPv4), queries the AWS Instance Metadata Service (both IMDSv1 and IMDSv2) to retrieve IAM role security credentials, pulls ECS task metadata, harvests environment variables matching DATABASE/DB/MYSQL/AURORA/POSTGRES/REDIS/RDS, and POSTs the collected data to the hardcoded endpoint https://webhook.site/4b2354a7-67fd-4641-92ac-e18bac8c09e8. The script then writes an empty Makefile to disguise the lack of an actual build. A second stage in lib/gmo/payment.rb unconditionally requirerelatives runtimepayload.rb, whose top-level code repeats the same IMDS credential fetch, ECS metadata lookup, and database/cache environment variable harvest on every require of the gem, exfiltrating to the same webhook endpoint. The file is self-labeled as a malicious native extension hook.

Affected Software

1 affected component
rubygems/gmo-payment=0.0.99

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Operational

    Rotate or revoke AWS IAM role credentials and database/cache credentials that may have been harvested and exfiltrated.

Event History

Nov 19, 2026
Advisory Published
via OSV·09:08 AM
Data Sourced
via OSV·09:08 AM
DescriptionAffected Software

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