Skip to content

← Public intelligence

PyPI package

picklescan

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

58 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. UnratedPyPIAmendedPublished

    Picklescan missing detection when calling pytorch function torch.utils.bottleneck.__main__.run_cprofile

    CVE-2025-71366 · GHSA-4r9r-ch6f-vxmx

    Affected
    • PyPI picklescan <= 0.0.27
    Fixed in
    0.0.28· Vendor fix available
    Issue
    Using torch.utils.bottleneck.main.runcprofile function, which is a pytorch library function to execute remote pickle file. Details The attack payload executes in the following steps: First, the attacker craft the payload by calling to torch.utils.bottleneck.main.runcprofile function in reduce method Then when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution. PoC Impact Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. What is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded. Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects. Corresponding https://github.com/FredericDT…

    Recommended action: Upgrade to 0.0.28 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 8.9PyPIAmendedPublished

    Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass

    CVE-2025-71325 · GHSA-9gvj-pp9x-gcfr

    Affected
    • PyPI picklescan < 0.0.27
    Fixed in
    0.0.27· Vendor fix available
    Issue
    Details There's a parsing logic error in picklescan and modelscan while trying to deal with opcode STACKGLOBAL. Function listglobals when handling STACKGLOBAL at position n, it is expected to track two arguments but in wrong range. The loop only consider the range from 1 to n-1 but forgets to consider the opcode at position 0. The correct range should be 0 to n-1. Attacker can put arg in position 0, thus the parser can only tract one argument. Then, the exception https://github.com/mmaitre314/picklescan/blob/2a8383cfeb4158567f9770d86597300c9e508d0f/src/picklescan/scanner.py#L281 will be triggered. Thus it can cause detection bypass since the malicious pickle file will trigger unexpected exceptions. Example: PoC Impact Detection bypass in both picklescan and modelscan. Note that it also affects the online hugging face pickle scanners, making the malicious pickle file bypass the detection. Fix To fix the range here, change range(1, n) to range(1, n+1) to ensure that n-offset stays…

    Recommended action: Upgrade to 0.0.27 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.3PyPIAmendedPublished

    Picklescan missing detection when calling built-in python library function timeit.timeit()

    CVE-2025-71351 · GHSA-v7x6-rv5q-mhwc

    Affected
    • PyPI picklescan < 0.0.25
    Fixed in
    0.0.25· Vendor fix available
    Issue
    Using timeit.timeit() function, which is a built-in python library function to execute remote pickle file. Details Pickle’s deserialization process is known to allow execution of function via reduce method. While Picklescan is meant to detect such exploits, this attack evades detection by calling built-in python library function like timeit.timeit(). And since timeit library wasn't inside unsafe globals blacklist, it may not raise red flag in the security scan. The attack payload executes in the following steps: First, the attacker craft the payload by calling to timeit.timeit() function from timeit library in reduce method Then, inside reduce method, the attacker import dangerous libarary like os and calling os.system() to run OS commands, for example: curl command. And then the attacker send this malicious pickle file to the victim. Then when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous…

    Recommended action: Upgrade to 0.0.25 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. Medium, CVSS 5.3PyPIAmendedPublished

    Picklescan failed to detect to some unsafe global function in Numpy library

    CVE-2025-71355 · GHSA-fj43-3qmq-673f

    Affected
    • PyPI picklescan < 0.0.25
    Fixed in
    0.0.25· Vendor fix available
    Issue
    An unsafe deserialization vulnerability in Python’s pickle module allows an attacker to bypass static analysis tools like Picklescan and execute arbitrary code during deserialization. This can be exploited by import some built-in function in Numpy library that indrectly call some dangerous function like exec() to execute some python code as a parameter, which the attacker can import dangerous library inside like os library and execute arbitrary OS commands. Details Pickle’s deserialization process is known to allow execution of function via reduce method. While Picklescan is meant to detect such exploits, this attack evades detection by calling function in Numpy library that call dangerous function like exec(). And since Numpy library wasn't inside unsafe globals blacklist, it may not raise red flag in the security scan. The attack payload executes in the following steps: - First, the attacker craft the payload by import runstring function in numpy.testing.private.utils -…

    Recommended action: Upgrade to 0.0.25 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. High, CVSS 7.1PyPIAmendedPublished

    Picklescan Vulnerable to Exfiltration via DNS via linecache and ssl.get_server_certificate

    CVE-2025-46417 · GHSA-93mv-x874-956g

    Affected
    • PyPI picklescan < 0.0.25
    Fixed in
    0.0.25· Vendor fix available
    Issue
    Picklescan does not detect malicious pickles that exfiltrate sensitive information via DNS after deserialization. Details picklescan’s blacklist can be bypassed to exfiltrate sensitive information (like file contents, secrets, or credentials) during model deserialization by leveraging ssl.getservercertificate as the callable function in the pickle payload. Since ssl is a standard Python library used for legitimate TLS operations, it is rarely blacklisted by static scanners or runtime monitors. The payload avoids flagged modules and instead uses linecache (also unflagged) to read local files. The exfiltrated data is added to DNS-safe chunks, and embedded as subdomains in a crafted FQDN. When passed to ssl.getservercertificate, the Python runtime performs a DNS resolution to the attacker-controlled domain, leaking the encoded content. The payload executes the following steps: - Reads sensitive local file content using linecache module - Encodes the data for DNS exfiltration -…

    Recommended action: Upgrade to 0.0.25 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 5.3PyPIAmendedPublished

    Zip Exploit Crashes Picklescan But Not PyTorch

    CVE-2025-1944 · GHSA-7q5r-7gvp-wc82

    Affected
    • PyPI picklescan < 0.0.23
    Fixed in
    0.0.23· Vendor fix available
    Issue
    PickleScan is vulnerable to a ZIP archive manipulation attack that causes it to crash when attempting to extract and scan PyTorch model archives. By modifying the filename in the ZIP header while keeping the original filename in the directory listing, an attacker can make PickleScan raise a BadZipFile error. However, PyTorch's more forgiving ZIP implementation still allows the model to be loaded, enabling malicious payloads to bypass detection. Details Python's built-in zipfile module performs strict integrity checks when extracting ZIP files. If a filename stored in the ZIP header does not match the filename in the directory listing, zipfile.ZipFile.open() raises a BadZipFile error. PickleScan relies on zipfile to extract and inspect the contents of PyTorch model archives, making it susceptible to this manipulation. PyTorch, on the other hand, has a more tolerant ZIP handling mechanism that ignores these discrepancies, allowing the model to load even when PickleScan fails.…

    Recommended action: Upgrade to 0.0.23 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Medium, CVSS 5.3PyPIAmendedPublished

    Zip Flag Bit Exploit Crashes Picklescan But Not PyTorch

    CVE-2025-1945 · GHSA-w8jq-xcqf-f792

    Affected
    • PyPI picklescan < 0.0.23
    Fixed in
    0.0.23· Vendor fix available
    Issue
    PickleScan fails to detect malicious pickle files inside PyTorch model archives when certain ZIP file flag bits are modified. By flipping specific bits in the ZIP file headers, an attacker can embed malicious pickle files that remain undetected by PickleScan while still being successfully loaded by PyTorch's torch.load(). This can lead to arbitrary code execution when loading a compromised model. Details PickleScan relies on Python’s zipfile module to extract and scan files within ZIP-based model archives. However, certain flag bits in ZIP headers affect how files are interpreted, and some of these bits cause PickleScan to fail while leaving PyTorch’s loading mechanism unaffected. By modifying the flagbits field in the ZIP file entry, an attacker can: - Embed a malicious pickle file (badfile.pkl) in a PyTorch model archive. - Flip specific bits (e.g., 0x1, 0x20, 0x40) in the ZIP metadata. - Prevent PickleScan from scanning the archive due to errors raised by zipfile. -…

    Recommended action: Upgrade to 0.0.23 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. Medium, CVSS 5.3PyPIAmendedPublished

    PyTorch Model Files Can Bypass Pickle Scanners via Unexpected Pickle Extensions

    CVE-2025-1716 · GHSA-655q-fx9r-782v

    Affected
    • PyPI picklescan < 0.0.22
    Fixed in
    0.0.22· Vendor fix available
    Issue
    CVE-2025-1889 Summary Picklescan fails to detect hidden pickle files embedded in PyTorch model archives due to its reliance on file extensions for detection. This allows an attacker to embed a secondary, malicious pickle file with a non-standard extension inside a model archive, which remains undetected by picklescan but is still loaded by PyTorch's torch.load() function. This can lead to arbitrary code execution when the model is loaded. Details Picklescan primarily identifies pickle files by their extensions (e.g., .pkl, .pt). However, PyTorch allows specifying an alternative pickle file inside a model archive using the pickle_file parameter when calling torch.load(). This makes it possible to embed a malicious pickle file (e.g., config.p) inside the model while keeping the primary data.pkl file benign. A typical attack works as follows: - A PyTorch model (model.pt) is created and saved normally. - A second pickle file (config.p) containing a malicious payload is…

    Recommended action: Upgrade to 0.0.22 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)osv.dev (2)Source checked Evidence →