Four pickle implementation bugs let attackers bypass Hugging Face scanning tools
Discrepancies between Python pickle implementations can be exploited to bypass security-critical scanning tools
Security & privacy arXiv 14 May 2026 Measurement Prototype evidence
Published as “PickleFuzzer: A Case Study in Fuzzing for Discrepancies Between Python Pickle Implementations”
Why it matters
The tool enables rapid discovery of implementation bugs that can be exploited to bypass pickle scanners, leading to security patches in the CPython codebase.
Summary
PICKLEFUZZER discovered 14 discrepancies across the three CPython pickle implementations, including four that are security critical, and all were found within the first 10 minutes of fuzzing. A week-long fuzzing campaign generated over 42 million error discrepancy payloads and 1 500 storage discrepancy payloads, which were triaged to 13 unique discrepancies, demonstrating rapid and effective detection. The evidence is based on a controlled Docker environment and a grammar-based fuzzer, but the paper does not provide detailed numbers on false-positive rates or coverage beyond the reported runs.
What they found 3
- PICKLEFUZZER identified 14 discrepancies.
“PICKLEFUZZER identified 14 discrepancies.”
- The week-long campaign produced over 42 million error discrepancy payloads and 1 500 storage discrepancy payloads, which were reduced to 13 unique discrepancies.
“During the first (week-long) campaign, PICKLEFUZZER discovered over 42 million error discrepancy payloads and 1500 storage discrepancy payloads, which were triaged down to 13 total discrepancies.”
- All 13 unique discrepancies were found within the first 6 minutes, half within 2 seconds.
“All 13 discrepancies were found within the first 6 minutes of the run, half of which were found within 2 seconds.”
Caveats 4
- PICKLEFUZZER is a grammar-based generation fuzzer, which limits the kinds of inputs that it generates.
- PICKLEFUZZER’s error identification is coarse-grained and does not consider the exception types.
- As a fuzzer, PICKLEFUZZER is designed to identify positive examples of discrepancies between pickle implementations, but is not guaranteed (nor expected) to be able to identify all instances of discrepancies in pickle implementations.
- PICKLEFUZZER’s payloads will always contain well-formed pickle programs that conform to the grammar, with valid opcodes and arguments. Specifically, some bugs associated with parsing the syntax may be missed, and if the grammar is incomplete or incorrect the fuzzer may miss out on available functionality.
What’s new here 4
- First automated differential fuzzing tool for Python pickle implementations.
- Creates a manually derived grammar to generate valid pickle programs despite the lack of a formal specification.
- Collects both exception-based and internal storage state (stack, metastack, memo) from deserializers for comparison.
- Integrates patches to expose internal execution state and normalizes import opcodes for consistent environments.