Malicious code in twilio-sdk (npm)
Description
The npm package 'twilio-sdk' impersonates the official Twilio Node SDK but contains an empty API and executes a post-install script that collects detailed environment information from the installer. This data includes hostname, domain, CI environment variables, and internal npm registry settings, which it sends unencrypted to a hardcoded external IP address. This behavior constitutes install-time reconnaissance and can leak sensitive internal infrastructure details if mistakenly installed by developers.
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 'twilio-sdk' npm package is a malicious package impersonating the legitimate Twilio SDK ('twilio'). Instead of providing a functional API, it exports an empty module and runs a postinstall script on installation. This script gathers various environment details such as the installer's hostname, DNS-resolved FQDN, Active Directory domain, current working directory, Node.js version, CI environment flags and identifiers, and the configured internal npm registry URL. It then sends this collected information via an unencrypted HTTP GET request to a hardcoded IP address (http://46.224.67.169:3000/ping). This behavior can lead to leakage of sensitive internal infrastructure information, enabling potential downstream targeting such as dependency confusion attacks or lateral movement within compromised environments. The package's README claims it is a 'security research honeypot,' but this does not mitigate the risk to developers who inadvertently install it.
Potential Impact
Installation of this package results in the leakage of sensitive internal environment information to an external third party without user consent. This includes internal domain names, CI/CD pipeline identifiers, and internal npm registry URLs, which could facilitate targeted attacks such as dependency confusion or lateral movement within an organization. The package itself does not provide any legitimate functionality, so its presence indicates a supply chain risk and potential reconnaissance activity.
Defensive Guidance
No official patch or remediation is available since this is a malicious package impersonating a legitimate one. The primary mitigation is to avoid installing 'twilio-sdk' and ensure the correct package name 'twilio' is used. Organizations should audit their dependencies to detect and remove this package if present. Developers should verify package names carefully before installation and consider using package allowlists or trusted registries to prevent accidental installation of malicious packages.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5621
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-889w-p55g-884m"]
- Ecosystems
- ["npm"]
Threat ID: 6a96f316acd9273b49e4938e
Added to database: 09/01/2026, 15:45:26 UTC
Last enriched: 09/08/2026, 15:07:58 UTC
Last updated: 10/01/2026, 22:40:21 UTC
Views: 27
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.