VYPR

gem · Malicious package advisory

Malware

coincheck_core

GHSA-chg7-fwfx-4vgp

Malicious code in coincheck_core (RubyGems)

Details

**Severity:** Critical

**Affected versions:** `= 19.4.10`

## Source: amazon-inspector (9e4fe5934fda00d2a3725c1e79fcd4adc47b74818802e7f2c50de278b269d240)
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, [email protected]) that does not correspond to the shipped behavior.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/78d0ba20d615fbedd73fd1d3140928492091c0df/osv/malicious/rubygems/coincheck_core/MAL-2026-21034.json))

**References:**
- https://github.com/ossf/malicious-packages/blob/78d0ba20d615fbedd73fd1d3140928492091c0df/osv/malicious/rubygems/coincheck_core/MAL-2026-21034.json
- https://rubygems.org/gems/coincheck_core/versions/19.4.10
- https://github.com/advisories/GHSA-chg7-fwfx-4vgp

Compromised versions (1)

  • = 19.4.10

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.