Version 0.2.7 of ve-bamreader, a bioinformatics BAM file reader published on September 16, 2025, carries a credential-stealing worm that fires automatically when developers run npm install. Armando's analysis shows the attack follows the same postinstall hook pattern seen across the broader Shai-Hulud campaign wave: a malicious bundle.js is added to the package and package.json is modified to execute it at install time. The payload steals AWS credentials and exfiltrates them to an attacker-controlled webhook.site endpoint shared across the entire campaign. The package is published under the teselagen-admin npm account, which manages 38 packages -- many of them unique to Teselagen, a synthetic biology company, suggesting this is an account takeover rather than a newly created campaign account.
Key Findings
- Malicious version: v0.2.7, published 2025-09-16; v0.2.6 is the clean baseline
- Entry point: postinstall lifecycle hook fires automatically on npm install
- Targets: Node.js developer environments and CI/CD pipelines -- steals AWS credentials
- Detection: Script-JS.Worm.SupplyChain (bundle.js), Text.Worm.SupplyChain (package.json), Archive-GZIP.Worm.SupplyChain (.tgz), Archive-TAR.Worm.SupplyChain (.tar)
Package Background
ve-bamreader is a bioinformatics utility for reading BAM alignment files, forked from shinout/bamreader. It was first published on April 9, 2018, and has accumulated 3,490 total downloads with 2 direct dependents. The package is published under the teselagen-admin npm account (email: devops@teselagen.com), which maintains 38 packages. The presence of 26 other teselagen-branded packages under this account -- including react-table, bio-parsers, ve-editor, and sequence-utils -- strongly indicates the teselagen-admin account was compromised rather than created by the attacker.
Attack Analysis
The attacker added bundle.js to the package and modified package.json to include a postinstall hook. The diff against v0.2.6 reveals exactly two changes. When npm install runs against v0.2.7, the postinstall hook executes "node bundle.js" automatically -- the developer or CI/CD pipeline triggers execution without any additional interaction.
The bundle.js payload (SHA-256 b74caeaa75e077c99f7d44f46daaf9796a3be43ecf24f2a1fd381844669da777) carries a distinct hash from the variant seen in other campaign packages, indicating the attacker deployed multiple worm builds across the wave. It reads AWS credential environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN), contacts the AWS Instance Metadata Service at 169.254.169.254, the GCP metadata server at metadata.google.internal, and the ECS task metadata endpoint at 169.254.170.2, then exfiltrates the collected data to https://webhook.site/bb8ca5f6-4175-45d2-b042-fc9ebb8170b7 -- the same attacker endpoint shared across all packages in the campaign. The npm registry also appears in the payload's URL set, consistent with the worm's self-propagation capability.