Skip to content

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

Unknown
Published
Updated
Exploit status
No public exploit known
Technology
MySQLCloud Platforms

Description


-= 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/runtime_payload.rb is loaded unconditionally from lib/aws_sdk_wrapper.rb, so require 'aws_sdk_wrapper' 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.

Source: ossf-package-analysis (2c307ff588f1539eb19db3483fbaa2b34dafede08e8552a88f96d08cb7ea2436)

The OpenSSF Package Analysis project identified 'aws_sdk_wrapper' @ 0.0.99 (rubygems) as malicious.

It is considered malicious because:

  • The package executes one or more commands associated with malicious behavior.

Upgrade path

1 package: 0 fixed.

PackageAffectedFixed inStatus
rubygems aws_sdk_wrapper(RubyGems) = 0.0.99 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
rubygems aws_sdk_wrapper(RubyGems) = 0.0.99 No fix listed

References