Malicious Code Injection in pretty-tabulate: A Security Threat

pretty-tabulate Updated 16 Mar 2026

Summary

16/03/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1480: Malicious code in pretty-tabulate (PyPI). Affects pretty-tabulate versions 2.37.1 – 2.37.2. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

pretty-tabulate is a Python package available on PyPI that is designed to enhance the presentation of tabular data in a visually appealing format. It allows developers to create well-structured tables with various styling options, making it easier to display data in a readable manner. However, recent findings have revealed that this package is vulnerable to a malicious code injection, which poses a significant security risk to users who incorporate it into their projects.

Vulnerability Detail

The vulnerability originates from the presence of malicious code within the pretty-tabulate package, specifically linked to the color-list package. This malicious code is triggered when pretty-tabulate is used, leading to the execution of hidden code from a third-party package. The malicious intent is clear, as the code is designed to compromise user data, potentially leading to information theft or other harmful actions. The packages were published by accounts that had been inactive for an extended period, suggesting that they may have been hijacked.

How To Fix

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

pip uninstall pretty-tabulate

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 workaround, users are advised to avoid using the pretty-tabulate package until they have updated to the patched version. Additionally, consider using alternative packages for tabular data presentation that do not have known vulnerabilities.

Conclusion

The discovery of malicious code within the pretty-tabulate package highlights the importance of vigilance in managing open-source dependencies. Users are encouraged to update their packages promptly and utilize tools like Vulert to monitor for vulnerabilities. By taking these steps, developers can help safeguard their applications against potential threats.

See every vulnerability recorded for pretty-tabulate →

Share this vulnerability

FAQ

The vulnerability involves malicious code that is triggered when using the pretty-tabulate package, potentially leading to data theft or other harmful actions.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.

You should immediately update to the latest version of pretty-tabulate by running 'pip install --upgrade pretty-tabulate' in your terminal.

While specific exploits have not been publicly detailed, the malicious intent suggests that the vulnerability could be exploited for data theft or other malicious activities.

Regularly update your dependencies, monitor for vulnerabilities using tools like Vulert, and review the security practices of the packages you use.

How To Fix

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

pip uninstall pretty-tabulate

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