CVE-2025-10157
Python vulnerability analysis and mitigation

Overview

A Protection Mechanism Failure vulnerability (CVE-2025-10157) was discovered in mmaitre314 picklescan versions up to and including 0.0.30. The vulnerability allows attackers to bypass the unsafe globals check functionality, which is designed to prevent malicious code execution. This bypass is possible because the scanner performs an exact match for module names, allowing malicious payloads to be loaded via submodules of dangerous packages (e.g., 'asyncio.unix_events' instead of 'asyncio'). The vulnerability was disclosed on September 8, 2025 (GitHub Advisory).

Technical details

The vulnerability stems from a flawed implementation in the scanner's module name checking mechanism. The issue occurs in the scanner.py file where the code performs strict matching against the unsafeglobals dictionary. The CVSS v4.0 score is 9.3 (Critical) with the vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. The vulnerability is classified as CWE-693 (Protection Mechanism Failure) (NVD).

Impact

When exploited, this vulnerability allows attackers to bypass PickleScan's security checks and potentially execute arbitrary code. The vulnerability is particularly concerning for organizations like HuggingFace and individuals using PickleScan to analyze PyTorch models or other files distributed as ZIP archives for malicious pickle content. Successful exploitation could lead to code execution on the user's system when processing or loading malicious files (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 0.0.31. The fix involves modifying the module name checking logic to account for submodule imports. Instead of exact matching, the new implementation checks if the imported module starts with any known unsafe global and verifies that it's either an exact match or a proper submodule. Users are strongly advised to upgrade to version 0.0.31 or later (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-6237CRITICAL9.8
  • PythonPython
  • invokeai
NoNoSep 18, 2025
CVE-2025-10157CRITICAL9.3
  • PythonPython
  • picklescan
NoYesSep 17, 2025
CVE-2025-10156CRITICAL9.3
  • PythonPython
  • picklescan
NoYesSep 17, 2025
CVE-2025-9906HIGH8.6
  • PythonPython
  • keras
NoYesSep 19, 2025
CVE-2025-9905HIGH7.3
  • PythonPython
  • keras
NoYesSep 19, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management