Junglewise Threat Intelligence

PickleScan arbitrary code execution via profile.run blocklist bypass

Severity: critical · CVSS 9.8 · Published 2026-06-17

Technologies: Mmaitre314 Picklescan. Vendors: PyPI.

Executive brief

PickleScan is a security tool used to scan Python pickle files for malicious code. A flaw in its safety filters allows specially crafted files to bypass detection and execute arbitrary commands on the system running the scan. This could lead to a total system compromise or data theft while the tool incorrectly reports that the file is safe.

Technical details

PickleScan before version 1.0.4 contains an incomplete blocklist (CWE-184) for the Python 'profile' module. While the scanner attempts to block 'Profile.run' and 'Profile.runctx', it uses exact string matching that fails to catch the module-level 'profile.run()' function. An attacker can craft a malicious pickle file that calls 'profile.run(statement)', which internally invokes 'exec()'. This allows for arbitrary code execution (RCE) with no user interaction or authentication required, while the scanner reports zero security issues. The vulnerability is addressed in version 1.0.4 by expanding the blocklist.

Affected products

  • mmaitre314 picklescan < 1.0.4

Timeline

  • 2026-03-02: advisory: Original GHSA-7wx9-6375-f5wh published
  • 2026-06-17: disclosed: NVD/CVE-2026-53873 published
  • 2026-06-18: patched: Version 1.0.4 released

References

Related threats