CVE-2020-22083

9.8 CRITICAL

📋 TL;DR

CVE-2020-22083 is a critical remote code execution vulnerability in jsonpickle versions through 1.4.1. It allows attackers to execute arbitrary code during deserialization of malicious JSON payloads via the decode() function. This affects any application using jsonpickle to deserialize untrusted data.

💻 Affected Systems

Products:
  • jsonpickle
Versions: All versions through 1.4.1
Operating Systems: All operating systems where Python and jsonpickle run
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default configuration when decode() is used with untrusted data. Some argue this is expected pickle behavior, but jsonpickle's documentation may not sufficiently warn users.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining remote code execution, potentially leading to data theft, ransomware deployment, or complete system takeover.

🟠

Likely Case

Remote code execution leading to application compromise, data exfiltration, and lateral movement within the network.

🟢

If Mitigated

No impact if jsonpickle is not used or only trusted data is deserialized.

🌐 Internet-Facing: HIGH - Any internet-facing service using jsonpickle with untrusted input is vulnerable to remote exploitation.
🏢 Internal Only: MEDIUM - Internal applications using jsonpickle with untrusted input remain vulnerable, though attack surface is reduced.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public proof-of-concept exploit code exists and can be easily adapted. Attack requires sending malicious JSON payload to vulnerable decode() function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 1.4.1

Vendor Advisory: https://github.com/jsonpickle/jsonpickle/issues/332

Restart Required: No

Instructions:

1. Upgrade jsonpickle to version 1.4.2 or later using pip install --upgrade jsonpickle. 2. Test application functionality after upgrade. 3. No restart required for Python applications unless specifically required by your deployment.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation to ensure only trusted, expected JSON data is passed to jsonpickle.decode()

Use Alternative Serialization

all

Replace jsonpickle with safer serialization libraries like json or yaml (with safe_load) for untrusted data

🧯 If You Can't Patch

  • Implement strict network controls to limit access to vulnerable services
  • Deploy web application firewall (WAF) rules to detect and block malicious JSON payloads

🔍 How to Verify

Check if Vulnerable:

Check installed jsonpickle version: pip show jsonpickle | grep Version. If version is 1.4.1 or earlier, system is vulnerable.

Check Version:

pip show jsonpickle | grep Version

Verify Fix Applied:

Verify jsonpickle version is 1.4.2 or later: pip show jsonpickle | grep Version. Test that application still functions correctly with legitimate JSON data.

📡 Detection & Monitoring

Log Indicators:

  • Unusual process execution from Python applications
  • Errors in application logs related to jsonpickle deserialization
  • Unexpected system commands executed by Python processes

Network Indicators:

  • Malformed or unusually structured JSON payloads sent to applications
  • Rapid serialization/deserialization requests

SIEM Query:

source="application.logs" AND ("jsonpickle" OR "decode()") AND (process_execution OR command_injection)

🔗 References

📤 Share & Export