CVE-2020-22083
📋 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
- jsonpickle
📦 What is this software?
Jsonpickle by Jsonpickle Project
⚠️ 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.
🎯 Exploit Status
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
allImplement strict input validation to ensure only trusted, expected JSON data is passed to jsonpickle.decode()
Use Alternative Serialization
allReplace 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
- https://access.redhat.com/security/cve/CVE-2020-22083
- https://gist.github.com/j0lt-github/bb543e77a1a10c33cb56cf23d0837874
- https://github.com/j0lt-github/python-deserialization-attack-payload-generator
- https://github.com/jsonpickle/jsonpickle/issues/332
- https://github.com/jsonpickle/jsonpickle/issues/332#issuecomment-747807494
- https://versprite.com/blog/application-security/into-the-jar-jsonpickle-exploitation/
- https://access.redhat.com/security/cve/CVE-2020-22083
- https://gist.github.com/j0lt-github/bb543e77a1a10c33cb56cf23d0837874
- https://github.com/j0lt-github/python-deserialization-attack-payload-generator
- https://github.com/jsonpickle/jsonpickle/issues/332
- https://github.com/jsonpickle/jsonpickle/issues/332#issuecomment-747807494
- https://versprite.com/blog/application-security/into-the-jar-jsonpickle-exploitation/