Malicious code in ecto-corsair-whisper-6f3b9 (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (8695ea17273c804f1a58e6c0b877de280f7472622065964245deb85cc62dae20) The package declares a postinstall lifecycle hook (postinstall.js) that runs automatically on `npm install`. The script shells out via curl to the EC2 IMDSv2 metadata endpoint to obtain IAM role credentials, exports them, then iterates AWS Secrets Manager across multiple regions calling `aws secretsmanager list-secrets` and `get-secret-value`, and additionally dumps any process environment variable matching `FLAG|HTB|SECRET|AWS_`. The captured blob is chunked and HTTP PUT to a hardcoded bare-IP destination (http://154.57.164.71:30782) framed as a fake 'manifest' JSON. Execution is gated by an `isAppWorker()` check (hostname matches a 12-hex Docker-style ID and cwd contains `/app/node_modules`), which narrows the victim profile to containerized CI/build workers but does not change the nature of the attack. Additional behavior includes scanning /app for HackTheBox flag patterns (`/HTB\{[^}]+\}/`) and reading /app/src/main.rs, /app/main.rs, /app/flag.txt. This is unambiguous install-time credential theft plus remote exfiltration: any installer whose container matches the gate has IAM role credentials, secrets, and environment-variable secrets sent to attacker-controlled infrastructure. ## Source: ghsa-malware (d0ca45bd5ff9251df7ade64227231b9db2164ed9c61735808e83cb5626c3505a) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
The ecto-corsair-whisper-6f3b9 npm package includes a postinstall script that runs automatically on npm install. This script accesses the EC2 IMDSv2 metadata endpoint to retrieve IAM role credentials, exports them, and enumerates AWS Secrets Manager secrets across multiple regions. It collects environment variables matching sensitive patterns and scans local files for HackTheBox flags. The collected data is chunked and exfiltrated via HTTP PUT to a hardcoded IP address. Execution is gated to containerized CI/build workers by hostname and working directory checks. This behavior constitutes install-time credential theft and remote exfiltration, resulting in full compromise of affected systems.
Potential Impact
Any system that installs this package and matches the containerized environment criteria is at risk of having AWS IAM credentials, secrets from AWS Secrets Manager, and sensitive environment variables stolen and sent to an attacker. This leads to a full compromise of the system and potentially the broader AWS environment accessible via the stolen credentials. The attacker may gain persistent access and control, making remediation difficult without secret rotation and system rebuild.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the ecto-corsair-whisper-6f3b9 package is recommended. All AWS credentials and secrets accessible from the compromised system must be rotated immediately from a secure, uncompromised environment. Due to the high likelihood of full system compromise, affected systems should be considered untrusted and rebuilt or replaced. Monitor for any unauthorized access using the stolen credentials. Avoid installing untrusted or unknown npm packages, especially in containerized CI/build environments.
Malicious code in ecto-corsair-whisper-6f3b9 (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (8695ea17273c804f1a58e6c0b877de280f7472622065964245deb85cc62dae20) The package declares a postinstall lifecycle hook (postinstall.js) that runs automatically on `npm install`. The script shells out via curl to the EC2 IMDSv2 metadata endpoint to obtain IAM role credentials, exports them, then iterates AWS Secrets Manager across multiple regions calling `aws secretsmanager list-secrets` and `get-secret-value`, and additionally dumps any process environment variable matching `FLAG|HTB|SECRET|AWS_`. The captured blob is chunked and HTTP PUT to a hardcoded bare-IP destination (http://154.57.164.71:30782) framed as a fake 'manifest' JSON. Execution is gated by an `isAppWorker()` check (hostname matches a 12-hex Docker-style ID and cwd contains `/app/node_modules`), which narrows the victim profile to containerized CI/build workers but does not change the nature of the attack. Additional behavior includes scanning /app for HackTheBox flag patterns (`/HTB\{[^}]+\}/`) and reading /app/src/main.rs, /app/main.rs, /app/flag.txt. This is unambiguous install-time credential theft plus remote exfiltration: any installer whose container matches the gate has IAM role credentials, secrets, and environment-variable secrets sent to attacker-controlled infrastructure. ## Source: ghsa-malware (d0ca45bd5ff9251df7ade64227231b9db2164ed9c61735808e83cb5626c3505a) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ecto-corsair-whisper-6f3b9 npm package includes a postinstall script that runs automatically on npm install. This script accesses the EC2 IMDSv2 metadata endpoint to retrieve IAM role credentials, exports them, and enumerates AWS Secrets Manager secrets across multiple regions. It collects environment variables matching sensitive patterns and scans local files for HackTheBox flags. The collected data is chunked and exfiltrated via HTTP PUT to a hardcoded IP address. Execution is gated to containerized CI/build workers by hostname and working directory checks. This behavior constitutes install-time credential theft and remote exfiltration, resulting in full compromise of affected systems.
Potential Impact
Any system that installs this package and matches the containerized environment criteria is at risk of having AWS IAM credentials, secrets from AWS Secrets Manager, and sensitive environment variables stolen and sent to an attacker. This leads to a full compromise of the system and potentially the broader AWS environment accessible via the stolen credentials. The attacker may gain persistent access and control, making remediation difficult without secret rotation and system rebuild.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the ecto-corsair-whisper-6f3b9 package is recommended. All AWS credentials and secrets accessible from the compromised system must be rotated immediately from a secure, uncompromised environment. Due to the high likelihood of full system compromise, affected systems should be considered untrusted and rebuilt or replaced. Monitor for any unauthorized access using the stolen credentials. Avoid installing untrusted or unknown npm packages, especially in containerized CI/build environments.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5640
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-5wjv-qgmc-8w9m"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba5068715ace4357ebab
Added to database: 07/10/2026, 09:24:32 UTC
Last enriched: 07/10/2026, 09:40:36 UTC
Last updated: 07/31/2026, 12:49:28 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.