MAL-2026-20211

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/gmo-payment/MAL-2026-20211.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-20211
Published
2026-11-19T09:08:19Z
Modified
2026-11-19T09:15:03Z
Summary
Malicious code in gmo-payment (RubyGems)
Details

-= 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 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.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-022887",
            "import_time":  "2026-11-19T09:13:05.161892246Z",
            "modified_time":  "2026-11-19T09:08:19Z",
            "sha256":  "4536bede455c58b0be6819cbc85b4566d1c567bfedc370aac7f97a3aacc9776b",
            "source":  "amazon-inspector",
            "versions":  [
                "0.0.99"
            ]
        }
    ]
}
References
Credits

Affected packages

RubyGems / gmo-payment

Package

Name
gmo-payment
Purl
pkg:gem/gmo-payment

Affected ranges

Affected versions

0.*
0.0.99

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "ext/gmo-payment/extconf.rb",
            "sha256":  "45855ecfdd3577b4a1b5ef0d0bc78ce74931051925ae30aa6b87b56c554a9b66",
            "tlsh":  "82417545a6d93462da949571fc1e42137b11e70f1e8c2650aec04ecd1fade3bb2336e1"
        },
        {
            "path":  "lib/runtime_payload.rb",
            "sha256":  "3722a762ad6ab7bc694d3e19e806bd221d1530d5b1cbe8a2a92825d6d4ba278c",
            "tlsh":  "04415589ead93472da945571fc1902126b11e70f1a882b50aed08edd1f6cf3bf1376e0"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "gmo-payment-0.0.99.gem",
            "hashes":  {
                "sha256":  "2ea2b445f3826fabc868b89da6dc6c77b9a7c3c6a89db9e04b003b04f86a6d3b"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/gmo-payment/MAL-2026-20211.json"