Snyk has reported that there have been attempts or successful attacks targeting this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsAvoid using all malicious instances of the telnyx package.
telnyx is a library that provides convenient access to the Telnyx REST API from any Python 3.9+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.
Affected versions of this package are vulnerable to Embedded Malicious Code. The package was compromised by the threat actor TeamPCP, who used stolen PyPI publishing credentials to upload malicious versions. The injected malicious code resides in the telnyx/_client.py file and executes automatically upon import, deploying either a persistent dropper or an infostealer depending on the host operating system.
The malicious payload executes silently at module scope when a user runs import telnyx. It uniquely uses WAV steganography to evade network detection, downloading what appear to be legitimate audio files from an external C2 server. The base64-encoded payload is hidden within the audio frame data and XOR-decrypted at runtime.
On Windows: The malware extracts and drops an executable masquerading as the Microsoft Build Engine (msbuild.exe) into the user's Startup folder (%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\msbuild.exe) to establish persistence across reboots.
On Linux/macOS: It executes a secondary Python script that harvests system credentials, encrypts them using AES-256-CBC wrapped with the attacker's RSA-4096 public key, and exfiltrates the stolen data to the C2 server packaged as a tpcp.tar.gz archive.