NetSight
criticalMalware report

GHSA-6c5q-63v2-x3j2

Malicious code in gmo-payment (RubyGems)

Impact

## 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 require_relatives runtime_payload.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. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/991edcfcf3b0f3d40ad386c23b06853971dc28de/osv/malicious/rubygems/gmo-payment/MAL-2026-20211.json))

Affected packages

EcosystemPackageAffectedFixed in
rubygemsgmo-payment= 0.0.99none recorded

Weakness classification

References