{"id":"MAL-2026-17787","summary":"Malicious code in evm-tx-decoder (RubyGems)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e478aa0270779720106fc6169e89fde089af352214fc720fbf8c284d51415f59)\nThe gem's native-extension build script ext/extconf.rb decodes a base64-embedded Ruby payload and executes it via eval inside a double-forked, detached child (Process.setsid, Process.detach). The payload opens a TCPSocket to the hardcoded bare-IP C2 at 45.138.12.177:8089 and connects it bidirectionally to /bin/sh via IO.popen and IO.copy_stream, yielding an interactive remote shell on the installer host at `gem install` time. Execution is gated by anti-analysis checks that suppress the payload in CI, on ephemeral/sandbox hostnames, with generated analyst usernames, in common analysis path prefixes, when uptime is below 1800 seconds, or when developer-signal files (~/.ssh, ~/.gitconfig, ~/.npmrc, ~/.gem/credentials, ~/.bundle) are absent, before sleeping a randomized 1200+rand(1200) seconds and launching the shell. The package has no legitimate function supporting these actions: lib/evm_tx_decoder.rb is a 243-byte stub returning 'ok'/true, the README text references an unrelated `bitcoin_rpc_lite` project, and extconf.rb calls create_makefile('bitcoin_rpc_lite_native') while shipping no C/C++ sources, so the native-build pretext is a cover story for the install-time backdoor.\n","modified":"2026-10-11T14:30:07.112244246Z","published":"2026-10-11T13:47:20Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["0.9.1"],"id":"IN-MAL-2026-021359","import_time":"2026-10-11T14:17:59.127383923Z","modified_time":"2026-10-11T13:47:20Z","sha256":"e478aa0270779720106fc6169e89fde089af352214fc720fbf8c284d51415f59"}]},"references":[{"type":"PACKAGE","url":"https://rubygems.org/gems/evm-tx-decoder/versions/0.9.1"}],"affected":[{"package":{"name":"evm-tx-decoder","ecosystem":"RubyGems","purl":"pkg:gem/evm-tx-decoder"},"versions":["0.9.1"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/evm-tx-decoder/MAL-2026-17787.json","indicators":{"evidence_files":[{"path":"ext/evm_tx_decoder/extconf.rb","sha256":"10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763","tlsh":"9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe"},{"path":"lib/evm_tx_decoder.rb","sha256":"2a64978f5ee8393abbf5da13fd56f43f9134390b2fdda5912d374f4420f69939","tlsh":"c7d0979d433e3820803e4421a4eceec79fe8203243501024a92d52c5461323e233be71"}]},"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}