Arbitrary Code Execution Risk in PickleScan due to Unsafe Globals Bypass

picklescan Updated 29 Dec 2025

Summary

29/12/2025
HIGH
Yes i
High
8.8

GHSA-hgrh-qx5j-jfwx: Picklescan Bypasses Unsafe Globals Check using pty.spawn. Affects picklescan versions < 0.0.33. Fixed in 0.0.33. 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

PickleScan is a security tool designed to analyze Python pickle files for potential threats, particularly in machine learning models and other serialized data formats. It aims to identify and mitigate risks associated with executing untrusted pickle data. However, a recent vulnerability has been discovered that allows attackers to bypass its safety checks, posing significant risks to users relying on this tool for secure data handling.

Vulnerability Detail

The vulnerability in PickleScan arises from its failure to include the 'pty.spawn' function in its list of unsafe globals. This oversight allows malicious actors to craft pickle payloads that exploit this function, leading to potential arbitrary code execution. Attackers can disguise harmful payloads within files that would typically be scanned for threats, thereby circumventing the intended security measures. The issue was highlighted during the 2025 HeroCTF event, where participants demonstrated the ability to bypass PickleScan's defenses using this method.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

pip install --upgrade "picklescan==1.0.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.0.33

This is the first release that contains the fix.

pip install --upgrade "picklescan==0.0.33"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can avoid processing untrusted pickle files until they have updated to the patched version. Additionally, users can manually inspect pickle files for suspicious content before loading them into their applications.

Conclusion

The vulnerability in PickleScan poses a significant risk to users by allowing arbitrary code execution through a bypass of unsafe globals checks. It is crucial for users to update to the latest version to mitigate this risk and ensure secure handling of pickle files.

See every vulnerability recorded for picklescan →

Share this vulnerability

FAQ

The vulnerability allows attackers to bypass safety checks for unsafe globals, specifically using the 'pty.spawn' function, leading to potential arbitrary code execution.

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

As a workaround, avoid processing untrusted pickle files and manually inspect any pickle data before loading it into your application.

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

You can visit the official PickleScan repository on GitHub for more details about its functionality and updates.

Related vulnerabilities

Recent vulnerabilities recorded for picklescan.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

pip install --upgrade "picklescan==1.0.5"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.0.33

This is the first release that contains the fix.

pip install --upgrade "picklescan==0.0.33"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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