Junglewise Threat Intelligence

CVE-2021-47952: jsonpickle insecure deserialization RCE via py/repr

CVE-2021-47952 · Severity: critical · CVSS 9.8 · Published 2026-05-16

Executive brief

jsonpickle is a Python library used to convert complex data structures into JSON format and back again. A security flaw allows attackers to send specially crafted JSON data that, when processed by the library, executes unauthorized commands on the underlying system. This could lead to a complete takeover of the server or application using the library to handle untrusted data.

Technical details

A remote code execution (RCE) vulnerability exists in jsonpickle versions up to and including 2.0.0 due to insecure deserialization. The vulnerability is rooted in the 'loadrepr' function, which utilizes the Python 'eval()' function to process objects tagged with the 'py/repr' directive. An unauthenticated attacker can exploit this by providing a malicious JSON string that, when passed to 'jsonpickle.decode()', executes arbitrary Python code or system commands. While the library documentation warns against unpickling untrusted data, this specific vector allows for RCE via standard JSON decoding interfaces. No official patch was available at the time of initial reporting, and users are advised to only decode data from trusted sources.

Affected products

  • jsonpickle jsonpickle <= 2.0.0

Timeline

  • 2021-02-24: disclosed: Exploit published on Exploit-DB
  • 2026-05-16: advisory: CVE-2021-47952 published/updated in NVD

References