﻿# PickleScan CVE-2025-10155: a filename could skip the right parser

The PickleScan extension-mismatch bypass returned a parsing error instead of completing pickle analysis. Review the actual fallback fix and the acceptance gate.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/picklescan-cve-2025-10155-extension-mismatch-dispatch/
Language: en

CVE-2025-10155 is a PickleScan format-dispatch bypass. A standard pickle file carrying a PyTorch-related extension could be routed to an unsuitable parser and escape the intended pickle analysis. The operational lesson is specific: an error from the selected parser must not become permission to accept the artifact.

## How extension-based dispatch skipped analysis

The [maintainer advisory](https://github.com/mmaitre314/picklescan/security/advisories/GHSA-jgw4-cr84-mqxg) describes a standard pickle renamed with an extension such as `.bin`. The affected scanner prioritizes the PyTorch branch, encounters an invalid-format condition and returns an error rather than continuing with ordinary pickle inspection. The result lacks the dangerous-global finding expected from analyzing the underlying pickle.

That is a failure to inspect the relevant content, not evidence that renaming changes serialization. The [artifact-validation guide](/journal/safetensors-artifact-validation/) makes the related distinction between a filename and a format. A renamed pickle still requires whatever deserialization behavior its actual contents specify. The scanner's output and the eventual consumer's behavior must therefore be examined separately.

## The actual fix continues after a format mismatch

The [linked fix commit](https://github.com/mmaitre314/picklescan/commit/28a7b4ef753466572bda3313737116eeb9b4e5c5) changes the invalid-magic branch to warn, rewind the stream and continue into other format checks. It also adds a regression fixture for this advisory. The same commit contains other changes, so its existence should not collapse distinct archive and checksum vulnerabilities into this extension-mismatch issue.

For an integration review, inspect which entry point the application invokes and whether it supplies a filename extension. Preserve the scanner version, input identity and complete result fields. A wrapper that reads only a list of dangerous globals can lose the separate indication that scanning failed. The acceptance decision should account for completion and coverage as well as findings.

## Keep the historical version boundary explicit

The [GitHub Advisory Database record](https://github.com/advisories/GHSA-jgw4-cr84-mqxg) identifies versions through 0.0.30 as affected and 0.0.31 as patched for this issue. It assigns CVE-2025-10155. This is a historical correction boundary, not a guarantee that the patched release covers every later scanner issue or every possible serialization format.

An inventory should identify scanners in build jobs, artifact gateways and background services, rather than only a developer's interactive environment. Record whether a failed scan blocks promotion, enters manual review or is silently ignored. A successful scan of a different file or revision is not evidence about the artifact that was finally loaded. Preserve that binding across copying, renaming and publication.

## Verify the gate without unpickling unknown models

A proposed regression check should establish that format-mismatch errors remain visible and cannot produce an accepted status. Use reviewed fixtures and inspect scanner outputs without deserializing untrusted content in the inference service. This article reports source review, not execution of the advisory's malicious sample.

Keep artifact provenance, scanner completion and repository-code permission as separate decisions. Even a successful pickle scan does not establish that an associated custom Python implementation is acceptable; the [custom-code review guide](/journal/huggingface-remote-code-review/) covers that additional boundary. For this particular bypass, a defensible result documents the corrected dispatch behavior and the application's handling of uncertain results, instead of equating absence of reported globals with proof of safety.
