{"id":"MAL-2026-21028","summary":"Malicious code in coincheck (RubyGems)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0d2ae2a1f9a6b364df847c05fdcfce85b9554932f9754f687657e367c1580a13)\nThe gem ships an identical credential-harvesting routine in three auto-executing locations: the gemspec-declared extension script ext/coincheck/extconf.rb (runs during `gem install` and writes a stub Makefile so the build appears to succeed), the library entry point lib/coincheck.rb (runs at top level on `require \"coincheck\"`), and lib/rubygems_plugin.rb (auto-loaded by RubyGems on any `gem` invocation, with a marker file under the temp directory gating repeats). The routine reads installer secrets including ~/.aws/credentials, ~/.ssh private keys, ~/.gem/credentials, ~/.netrc, ~/.kube/config,.env files and Rails master.key/credentials, dumps the full environment, runs shell commands for host/process/network reconnaissance, and requests cloud instance metadata credentials from 169.254.169.254 and metadata.google.internal. The collected data is compressed, base64-encoded with a \"CCGEM1\" prefix and POSTed to hardcoded webhook.site endpoints, with an additional DNS out-of-band channel to oast.fun. No native code is actually built. Installing, loading, or merely running any gem command on an affected host discloses cloud, SSH and registry-publishing credentials to an external collector.\n\n## Source: ossf-package-analysis (b70d846777dd88787dc5d3801839ee8db181d149ced5ee254ce4363a92814d88)\nThe OpenSSF Package Analysis project identified 'coincheck' @ 19.4.10 (rubygems) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n\n- The package executes one or more commands associated with malicious behavior.\n","modified":"2026-12-03T06:30:03.959916403Z","published":"2026-12-03T05:54:43Z","database_specific":{"malicious-packages-origins":[{"versions":["19.4.10"],"id":"IN-MAL-2026-023160","import_time":"2026-12-03T06:26:16.341914904Z","modified_time":"2026-12-03T05:54:43Z","sha256":"0d2ae2a1f9a6b364df847c05fdcfce85b9554932f9754f687657e367c1580a13","source":"amazon-inspector"},{"sha256":"b70d846777dd88787dc5d3801839ee8db181d149ced5ee254ce4363a92814d88","source":"ossf-package-analysis","versions":["19.4.10"],"import_time":"2026-12-03T06:26:14.731276085Z","modified_time":"2026-12-03T06:11:10Z"}]},"references":[{"type":"PACKAGE","url":"https://rubygems.org/gems/coincheck/versions/19.4.10"}],"affected":[{"package":{"name":"coincheck","ecosystem":"RubyGems","purl":"pkg:gem/coincheck"},"versions":["19.4.10"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"cae1a5f78894ec3368f7c768e5277102ff1153872a740420ba1d6e9d2f38ba6a1659f4","path":"ext/coincheck/extconf.rb","sha256":"7e093b00f261599789398960628ad8aeb451a4535fa5f40b2b88eef35f7822b3"},{"sha256":"b1951d1de5e69f85728636bd9d3a68f243f2d4356b6a4182601e1c01db210d92","tlsh":"9be194f79894ec3368f7c768e5277102ff1053872a740420ba1d2e9d2f3caa6a1659f4","path":"lib/coincheck.rb"},{"path":"lib/rubygems_plugin.rb","sha256":"df66375bcfbe53ff7400702d0aa51551ffa67acca5fee2f0448e43aad389c554","tlsh":"0ce195f79894ec3368f7c768e5277102ff1053872a740420ba1d2e9d2f3caa6a1659f4"}],"package_integrity":[{"hashes":{"sha256":"72ad1359404126e6acf1999f61fcd5cbc3cefe78eac42ebb24d29371ef62478c"},"filename":"coincheck-19.4.10.gem"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/coincheck/MAL-2026-21028.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}