Critical Malicious Code Vulnerability in chbencode Package

chbencode Updated 02 Oct 2025

Summary

28/03/2025
CRITICAL
No i
Critical
Not published

MAL-2025-2945: Malicious code in chbencode (PyPI). Affects chbencode versions 1.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The chbencode package is a Python library designed for encoding and decoding data in the BitTorrent protocol format. It is commonly used in applications that require efficient data transmission and storage. However, the package has been found to contain malicious code that can compromise the security of applications utilizing it.

Vulnerability Detail

The vulnerability identified as MAL-2025-2945 stems from malicious code embedded within version 1.0.0 of the chbencode package. This code can lead to unauthorized access, data breaches, and potential exploitation of the systems that rely on this package. The malicious nature of the code poses significant risks to both developers and end-users, as it can manipulate data and execute harmful operations without consent.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall chbencode

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary measure, you can avoid using the chbencode package until a secure version is released. Alternatively, consider using other libraries that provide similar functionality without the associated risks.

Conclusion

The chbencode package has a critical vulnerability due to malicious code in version 1.0.0. It is crucial for developers to update the package to a secure version or consider alternative solutions to mitigate risks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for chbencode →

Share this vulnerability

FAQ

The chbencode package is used for encoding and decoding data in the BitTorrent protocol format, facilitating efficient data transmission.

The malicious code can lead to unauthorized access and data breaches, potentially compromising the integrity and security of your application.

Yes, you can use the Vulert platform to monitor and alert for vulnerabilities in your application without requiring access to the code. Visit Vulert Scanner to check if your application is affected.

If an immediate update is not possible, consider using alternative libraries that provide similar functionality or temporarily avoid using the chbencode package.

Detailed information about this vulnerability can be found in the official repository and security advisories related to the chbencode package.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall chbencode

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback