Malicious Code Execution in pafex Package - Security Alert

pafex Updated 20 Oct 2026

Summary

20/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-18094: Malicious code in pafex (PyPI). Affects pafex versions 2.3. 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 pafex package, available on PyPI, is a Python library that is often used as a dependency in various applications. It is designed to facilitate certain functionalities within Python projects. However, it has been found to contain malicious code that exploits the unpickling process, leading to potential security breaches. This vulnerability poses a significant risk to users who rely on pafex for their projects, as it can lead to unauthorized access and control over their systems.

Vulnerability Detail

The vulnerability originates from a malicious campaign identified as '2026-10-webreader'. The main package, resion, embeds a pickle file disguised as a configuration file. The pafex dependency contains code that loads this pickle file. During the unpickling process, malicious code is executed automatically, establishing persistence on the victim's machine through a PTH file and downloading further payloads. The malicious actions include file exfiltration, remote command execution, and potential control over the victim's system.

How To Fix

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

pip uninstall pafex

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 using the pafex package until a secure version is confirmed. Additionally, ensure that any pickled data is sourced from trusted origins only, and consider using safer serialization methods such as JSON or YAML instead of pickle.

Conclusion

The pafex package has been identified as containing malicious code that can execute during the unpickling process, posing a significant security risk. Users are advised to update their packages and exercise caution with untrusted data. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for pafex →

Share this vulnerability

FAQ

The vulnerability involves malicious code execution during the unpickling of a compromised pickle file, which can lead to unauthorized access and control over the system.

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 pafex, immediately update to the latest version using 'pip install --upgrade pafex' to mitigate the risk.

The consequences include unauthorized access to sensitive data, remote command execution, and the establishment of persistence on the victim's machine.

To prevent similar vulnerabilities, always validate and sanitize inputs, avoid using pickle for untrusted data, and regularly update dependencies to their latest secure versions.

How To Fix

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

pip uninstall pafex

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