Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. picklescan
  4. ›
  5. GHSA-97f8-7cmv-76j2

GHSA-97f8-7cmv-76j2: Picklescan (scan_pytorch) Bypass via dynamic eval MAGIC_NUMBER

February 18, 2026

This is a scanning bypass to scan_pytorch function in picklescan. As we can see in the implementation of get_magic_number() that uses pickletools.genops(data) to get the magic_number with the condition opcode.name includes INT or LONG, but the PyTorch’s implemtation simply uses pickle_module.load() to get this magic_number. For this implementation difference, we then can embed the magic_code into the PyTorch file via dynamic eval on the \_\_reduce\_\_ trick, which can make the pickletools.genops(data) cannot get the magic_code in INT or LONG type, but the pickle_module.load() can still return the same magic_code, eading to a bypass.

References

  • github.com/advisories/GHSA-97f8-7cmv-76j2
  • github.com/mmaitre314/picklescan
  • github.com/mmaitre314/picklescan/commit/b9997634683a4f4bd0c7e3701e7ce7e90fe70e8c
  • github.com/mmaitre314/picklescan/security/advisories/GHSA-97f8-7cmv-76j2

Code Behaviors & Features

Detect and mitigate GHSA-97f8-7cmv-76j2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.0.3

Fixed versions

  • 1.0.3

Solution

Upgrade to version 1.0.3 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs

Source file

pypi/picklescan/GHSA-97f8-7cmv-76j2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 19 Feb 2026 12:21:18 +0000.