MAL-2026-21034: Malicious code in coincheck_core (RubyGems)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (9e4fe5934fda00d2a3725c1e79fcd4adc47b74818802e7f2c50de278b269d240) The gemspec-declared extension script ext/coincheckcore/extconf.rb executes during gem install and, before emitting a stub Makefile, reads installer secret files (~/.aws/credentials, ~/.ssh private keys, ~/.gem/credentials, ~/.netrc, ~/.npmrc, ~/.kube/config,.env files, Rails master.key/credentials), dumps the full process environment, queries cloud instance metadata at 169.254.169.254 for role credentials, and shells out via IO.popen for host reconnaissance (id/whoami, uname, network configuration, process list, git remotes). The collected data is compressed, base64-encoded, and POSTed to hardcoded https://webhook.site/<token> collector URLs, with a DNS out-of-band fallback to oast.fun. The same payload module is duplicated in lib/coincheckcore.rb and invoked at top level, so require "coincheckcore" repeats the harvest in any consuming process, and in lib/rubygemsplugin.rb, which RubyGems auto-loads on every gem command, using a /tmp marker file to deduplicate runs. A source comment self-describes the code as a dependency-confusion payload, and the gemspec presents Coincheck Inc. metadata (coincheck.com, dev@coincheck.com) that does not correspond to the shipped behavior.
Affected Software
Event History
Frequently Asked Questions
When can the malicious code run?
It runs during gem installation through ext/coincheck_core/extconf.rb. It can also run when an application requires coincheck_core and, through the RubyGems plugin, on gem commands after the gem is installed; a /tmp marker is used to avoid repeated runs.
Do systems need to actively use the gem to be exposed?
No. Installing the gem is sufficient to trigger collection, and the included RubyGems plugin is described as auto-loading on every gem command. Requiring the library in a consuming process triggers the collection again.
What information can be collected from an affected host?
The code targets AWS credentials, SSH private keys, RubyGems credentials, netrc, npm and Kubernetes configuration, environment files, and Rails credentials. It also captures the full process environment, attempts to obtain cloud instance-role credentials from 169.254.169.254, and gathers host, network, process, and Git remote information.
What network activity could indicate collection or exfiltration?
Collected data is compressed, base64-encoded, and sent by HTTPS POST to hardcoded webhook.site collector URLs. The code also includes a DNS out-of-band fallback using oast.fun.