Malicious Code Exfiltration in dify-api Package

dify-api Updated 13 Jan 2026

Summary

13/01/2026
CRITICAL
No i
Critical
Not published

MAL-2026-248: Malicious code in dify-api (PyPI). Affects dify-api versions 2.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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The dify-api package, available on PyPI, is designed for developers to integrate various functionalities into their applications. However, it has been identified as containing malicious code that exfiltrates sensitive information from the host system. This vulnerability poses a risk to users who unknowingly install the package, as it compromises their system's security.

Vulnerability Detail

The vulnerability originates from the package's design, which includes code that exfiltrates basic information such as the host's IP address and username. The malicious behavior is triggered during the installation process, as the package overrides the install command in setup.py to execute this code. This poses a limited risk but is still significant as it can lead to unauthorized access to user data.

How To Fix

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

pip uninstall dify-api

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, users can avoid installing the dify-api package until a secure version is released. Additionally, consider using a virtual environment to isolate dependencies and reduce the risk of exposure to malicious packages.

Conclusion

The dify-api package has been identified as containing malicious code that can exfiltrate sensitive information from users' systems. It is crucial for developers to be aware of this vulnerability and take immediate action to protect their applications. Regularly updating packages and using tools like Vulert can help in maintaining security.

See every vulnerability recorded for dify-api →

Share this vulnerability

FAQ

The dify-api package is a Python library available on PyPI, intended for developers to integrate various functionalities into their applications.

The malicious code in the dify-api package exfiltrates basic information such as the host's IP address and username.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If you have installed the dify-api package, you should uninstall it immediately and check for any updates or patches that may address the vulnerability.

Vulert monitors and alerts in real-time for open-source vulnerabilities in your software by using the Pipfile.lock, allowing you to stay informed about potential risks.

How To Fix

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

pip uninstall dify-api

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