Embedded Malicious Code Affecting telnyx package, versions [4.87.1][4.87.2]


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Attacked

Do your applications use this vulnerable package?

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 applications
  • Snyk IDSNYK-PYTHON-TELNYX-15790745
  • published27 Mar 2026
  • disclosed26 Mar 2026
  • creditCharlie Eriksen

Introduced: 26 Mar 2026

Malicious CVE NOT AVAILABLE CWE-506  (opens in a new tab)

How to fix?

Avoid using all malicious instances of the telnyx package.

Overview

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.

Malware Behavior

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.

CVSS Base Scores

version 4.0
version 3.1