Malicious Code Exfiltration in serpapi-python Package

serpapi-python Updated 03 Feb 2026

Summary

03/02/2026
CRITICAL
No i
Critical
Not published

MAL-2026-702: Malicious code in serpapi-python (PyPI). Affects serpapi-python versions 0.0.0 – 0.1.5. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The serpapi-python package is a Python client for the SerpApi service, which allows users to scrape search engine results. It is designed to facilitate the retrieval of search data in a structured format. However, this package has been found to contain malicious code that compromises user data by exfiltrating sensitive information from the host system.

Vulnerability Detail

The vulnerability originates from the package's installation process, where it overrides the install command in setup.py to execute malicious code. This code is designed to exfiltrate basic information about the host, such as the IP address and username, posing a risk to user privacy and security. The package has no legitimate purpose beyond this malicious activity, making it a significant threat to users who install it.

How To Fix

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

pip uninstall serpapi-python

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

There are no specific workarounds for this vulnerability other than avoiding the installation of the serpapi-python package. If you have already installed it, ensure to uninstall it immediately.

Conclusion

The serpapi-python package has been identified as containing malicious code that exfiltrates sensitive information from the host system. Users are advised to uninstall the affected versions and consider alternative packages for their needs. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for serpapi-python →

Share this vulnerability

FAQ

The serpapi-python package is a client for the SerpApi service, allowing users to scrape and retrieve search engine results in a structured format.

The malicious code executes during the installation process, exfiltrating sensitive information such as the user's IP address and username.

The affected versions of the serpapi-python package are 0.0.0 and 0.1.5.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If you have installed the serpapi-python package, you should uninstall it immediately using the command: pip uninstall serpapi-python.

How To Fix

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

pip uninstall serpapi-python

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