Skip to content

Telnyx PyPI Package Supply Chain Attack

A supply-chain attack was observed on the Telnyx package on the Python Package Index, where malicious versions were uploaded that deliver credential-stealing malware hidden inside a WAV file.

Severity awaiting reviewSupply chain
Incident date
Published
Read time
7 min
C
CertGPS

Not independently reviewed

AI-assisted content. Editorial policy · Suggest a correction

View source
On this page

Note: This analysis is based on publicly available information from source article. Facts are clearly separated from technical analysis.

Executive Summary

On March 27, 2026, a supply chain attack was discovered in the Telnyx PyPI package, affecting over 740,000 downloads per month on PyPI. The malicious code was contained in the 'telnyx/_client.py' file, which triggered automatically at import. The payload spawned a detached process that downloaded a second-stage disguised as a WAV audio file from a remote command-and-control (C2) server. The attack was believed to have been carried out by hackers who breached the project using stolen credentials for the publishing account on the PyPI registry.

The severity of this incident is high, as it affected multiple platforms (Windows, Linux, macOS) and potentially compromised sensitive data from infected hosts. Developers are strongly advised to roll back to Telnyx SDK version 4.87.0 if they find Telnyx version 4.87.1 and 4.87.2 in their environments.

What Happened: Timeline

✅ Verified Facts

TimeEvent
March 27, 2026 03:51 UTCTeamPCP published Telnyx version 4.87.1
March 27, 2026 04:07 UTCTeamPCP published Telnyx version 4.87.2
March 27, 2026 05:13 PMArticle published

Technical Deep Dive

Understanding PyPI

PyPI (Python Package Index) is a repository of software for the Python programming language. It allows developers to easily install and manage packages using pip, the package installer for Python. PyPI is a critical component of the Python ecosystem, providing a centralized location for developers to share and discover packages.

How PyPI Works

When a developer installs a package using pip, the package is downloaded from PyPI and installed on their system. PyPI uses a simple and efficient architecture to manage package metadata and storage. When a package is uploaded to PyPI, it is stored in a database and made available for download.

Security Considerations

PyPI's architecture makes it vulnerable to supply chain attacks, where malicious packages are uploaded to the repository and downloaded by unsuspecting developers. In this incident, the malicious code was contained in the 'telnyx/_client.py' file, which triggered automatically at import. This highlights the importance of verifying the authenticity of packages before installing them.

Understanding WAV Files

WAV files are a type of audio file format that stores uncompressed audio data. They are commonly used for storing and playing back audio data, such as music or voice recordings. In this incident, the payload spawned a detached process that downloaded a second-stage disguised as a WAV audio file from a remote command-and-control (C2) server.

How WAV Files Work

WAV files store audio data in a binary format, which can be played back using audio players or software. However, WAV files can also be used to store malicious code, such as in this incident. The malicious code was extracted using a simple XOR-based decryption routine and executed in memory to harvest sensitive data from the infected host.

Understanding XOR-Based Decryption

XOR-based decryption is a simple encryption technique that uses the XOR operator to encrypt and decrypt data. In this incident, the payload used XOR-based decryption to extract the malicious code from the WAV file. XOR-based decryption is a common technique used in malware to evade detection.

Analysis: What Went Wrong

Technical Root Cause

The technical root cause of this incident was the breach of the Telnyx project using stolen credentials for the publishing account on the PyPI registry. This allowed the hackers to upload malicious packages to PyPI, which were then downloaded by unsuspecting developers.

Contributing Factors

The contributing factors to this incident were:

  • The use of stolen credentials for the publishing account on the PyPI registry
  • The lack of authentication and verification mechanisms on PyPI
  • The use of XOR-based decryption to extract the malicious code from the WAV file
  • The lack of detection and prevention mechanisms on the infected hosts

Lessons for Security Professionals

Key Takeaways

  1. Verify the authenticity of packages before installing them: This incident highlights the importance of verifying the authenticity of packages before installing them. Developers should always check the package metadata and verify the package signature before installing it.
  2. Use secure authentication and verification mechanisms: This incident highlights the importance of using secure authentication and verification mechanisms on PyPI. Developers should always use secure authentication and verification mechanisms to prevent unauthorized access to the repository.
  3. Use detection and prevention mechanisms: This incident highlights the importance of using detection and prevention mechanisms on infected hosts. Developers should always use detection and prevention mechanisms to prevent malware from executing on their systems.

Prevention & Detection

How to Prevent

  • Verify the authenticity of packages before installing them: This can be done by checking the package metadata and verifying the package signature.
  • Use secure authentication and verification mechanisms: This can be done by using secure authentication and verification mechanisms on PyPI.
  • Use detection and prevention mechanisms: This can be done by using detection and prevention mechanisms on infected hosts.

How to Detect

  • Monitor system logs: This can be done by monitoring system logs for suspicious activity.
  • Use antivirus software: This can be done by using antivirus software to detect and prevent malware from executing on the system.
  • Use intrusion detection systems: This can be done by using intrusion detection systems to detect and prevent unauthorized access to the system.
View related certification topics

Security+

  • Domain 1: Security and Risk Management: This incident highlights the importance of verifying the authenticity of packages before installing them and using secure authentication and verification mechanisms on PyPI.
  • Domain 2: Asset Security: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

CySA+

  • Domain 1: Security and Risk Management: This incident highlights the importance of verifying the authenticity of packages before installing them and using secure authentication and verification mechanisms on PyPI.
  • Domain 2: Asset Security: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

CEH

  • Domain 1: Network Security: This incident highlights the importance of using secure authentication and verification mechanisms on PyPI to prevent unauthorized access to the repository.
  • Domain 2: Malware Analysis: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

CISSP

  • Domain 1: Security and Risk Management: This incident highlights the importance of verifying the authenticity of packages before installing them and using secure authentication and verification mechanisms on PyPI.
  • Domain 2: Asset Security: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

OSCP

  • Domain 1: Network Security: This incident highlights the importance of using secure authentication and verification mechanisms on PyPI to prevent unauthorized access to the repository.
  • Domain 2: Malware Analysis: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

CISM

  • Domain 1: Information Security Governance: This incident highlights the importance of verifying the authenticity of packages before installing them and using secure authentication and verification mechanisms on PyPI.
  • Domain 2: Information Risk Management: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

CISM

  • Domain 1: Information Security Governance: This incident highlights the importance of verifying the authenticity of packages before installing them and using secure authentication and verification mechanisms on PyPI.
  • Domain 2: Information Risk Management: This incident highlights the importance of using detection and prevention mechanisms on infected hosts to prevent malware from executing on the system.

Source (1)

This analysis is based on: https://www.bleepingcomputer.com/news/security/backdoored-telnyx-pypi-package-pushes-malware-hidden-in-wav-audio/


This incident analysis is provided for educational purposes. Facts are cited from the source article, while technical analysis represents professional interpretation.