Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2025-32434-poc — Proof-of-concept exploit for CVE-2025-32434, a pickle deserialization vulnerability in PyTorch's weights_only mode, demonstrating malicious tar file generation and execution. | Kitploit
Tools/GitHubGitHub/cyhe50/cve-2025-32434-poc
Vulnerability AnalysisExploitationMachine LearningPayload DevelopmentAI SecurityBinary Exploitation
GitHubcyhe50/cve-2025-32434-poc

cve-2025-32434-poc

Proof-of-concept exploit for CVE-2025-32434, a pickle deserialization vulnerability in PyTorch's weights_only mode, demonstrating malicious tar file generation and execution.

View Repository
1910 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-32434

Description

Technical Details

The vulnerability entry point is load() in torch/serialization.py

when protection (weights_only) is enabled: loading a tar file would call these functions in chain:

  1. load(): torch/serialization.py:1117
  2. _load_legacy(): torch/serialization.py:1376 to torch/serialization.py:1406
  3. persistent_load(): torch/serialization.py:1474
  4. pickle_moudle.load(): torch/serialization.py:1487
  5. Unpickler.load(): torch/_weights_only_unpickler.py:214

In the weights_only_unpickler mode, it's all about pickle deserialization, so searching for pickle protocol may help. reference: https://rushter.com/blog/pickle-serialization-internals/

How This POC Works

Picked Version: pytorch 2.5.0

This POC first generates a malicious tar file, note that the file name "storages" is required by the pytorch, then loads the tar file to trigger the vulnerability.

Further Goal

Now the tar file is executable in insecure mode. The next step is to enable the security protection and bypass the verification like this:

_pickle.UnpicklingError: Unsupported global: GLOBAL __builtin__.eval was not an allowed global by default. Please use `torch.serialization.add_safe_globals([eval])` to allowlist this global if you trust this class/function.
Download Tool