cvelo
P2 · HighMalware

Malicious code in coincheck_core (RubyGems)

  • MAL-2026-21034

Description

The gemspec-declared extension script ext/coincheck_core/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/coincheck_core.rb and invoked at top level, so `require "coincheck_core"` repeats the harvest in any consuming process, and in lib/rubygems_plugin.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.

Text from the OSV record.

Affected

  • coincheck_coreRubyGems

    • No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.