MAL-2026-20210: Malicious code in aws_sdk_wrapper (RubyGems)

Published Nov 19, 2026
·
Updated

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

Source: amazon-inspector (d7d404dac5d62c717d33c80682fe93f240bb31f71d0886311752dfbfdb390abe) The gem presents itself as an AWS SDK wrapper but ships no SDK functionality. Two code paths perform identical credential theft against the installer. First, ext/.../extconf.rb runs automatically during gem install via the gemspec extensions: entry: it queries the EC2 Instance Metadata Service (IMDSv2 and IMDSv1) at 169.254.169.254 to read the host's IAM role security credentials, collects host fingerprint data (hostname, whoami, uname, pwd, local IP), ECS task metadata, and every environment variable matching DATABASE/MYSQL/POSTGRES/REDIS/RDS, and POSTs the data to the hardcoded endpoint https://webhook.site/4b2354a7-67fd-4641-92ac-e18bac8c09e8. It then writes a stub Makefile so the build appears to succeed and no native source is actually compiled. Second, lib/runtimepayload.rb is loaded unconditionally from lib/awssdkwrapper.rb, so require 'awssdkwrapper' repeats the same IMDS credential read, host fingerprint, DB env scrape, and ECS metadata exfiltration to the same webhook.site URL in any consumer process. The gem name mimics the AWS SDK namespace; the package is a lure whose only behavior is credential exfiltration at install time and at require time.

Affected Software

1 affected component
rubygems/aws_sdk_wrapper=0.0.99

Event History

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

Frequently Asked Questions

1

When can the malicious code execute?

It executes during gem installation through the gem's extconf.rb extension hook. It also executes whenever a process requires aws_sdk_wrapper, because runtime_payload.rb is loaded unconditionally.

2

Which systems are most exposed?

Hosts or containers with access to the EC2 Instance Metadata Service are exposed to IAM role credential theft. ECS environments and processes holding environment variables with names matching DATABASE, MYSQL, POSTGRES, REDIS, or RDS may also expose task metadata and database-related secrets.

3

What data is sent off host?

The gem attempts to send EC2 IAM role credentials, ECS task metadata, host details including hostname, user, operating-system information, working directory, and local IP address, plus matching database-related environment variables. The data is POSTed to https://webhook.site/4b2354a7-67fd-4641-92ac-e18bac8c09e8.

4

How can I determine whether a system may be affected?

Check whether aws_sdk_wrapper version 0.0.99 was installed or required by an application. Installation alone can trigger the payload, and any application process that required the gem can trigger it again.

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