CVE-2023-32321
📋 TL;DR
CVE-2023-32321 is a critical vulnerability in CKAN data management systems that allows authenticated users to write arbitrary files and achieve remote code execution through insecure pickle loading. It affects all CKAN installations below versions 2.9.9 and 2.10.1. The vulnerability can lead to complete system compromise.
💻 Affected Systems
- CKAN (Comprehensive Knowledge Archive Network)
📦 What is this software?
Ckan by Okfn
Ckan by Okfn
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise via remote code execution, allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.
Likely Case
Data theft, resource manipulation, and potential privilege escalation leading to unauthorized access to sensitive datasets.
If Mitigated
Limited to authenticated user actions only, but still significant due to multiple attack vectors including file writes and session manipulation.
🎯 Exploit Status
Exploitation requires authenticated access but leverages multiple attack vectors including arbitrary file write and insecure pickle deserialization.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: CKAN 2.9.9 or CKAN 2.10.1
Vendor Advisory: https://github.com/ckan/ckan/security/advisories/GHSA-446m-hmmm-hm8m
Restart Required: Yes
Instructions:
1. Backup your CKAN instance and database. 2. Update CKAN to version 2.9.9 or 2.10.1 using your package manager or pip. 3. Restart all CKAN services including web server and workers. 4. Verify the update was successful.
🔧 Temporary Workarounds
No known workarounds
allThe vendor advisory states there are no known workarounds for these vulnerabilities.
🧯 If You Can't Patch
- Restrict access to CKAN to trusted users only and implement strict authentication controls
- Monitor for suspicious file writes, resource ID manipulation, and session store access patterns
🔍 How to Verify
Check if Vulnerable:
Check CKAN version via command line: 'ckan --version' or check the CKAN configuration file for version information.
Check Version:
ckan --version
Verify Fix Applied:
Verify CKAN version is 2.9.9 or higher for 2.9.x branch, or 2.10.1 or higher for 2.10.x branch.
📡 Detection & Monitoring
Log Indicators:
- Unusual resource creation with crafted IDs
- File writes to unexpected locations
- Session store manipulation attempts
- Pickle deserialization errors
Network Indicators:
- Multiple requests to resource_create, package_update, or session endpoints with crafted parameters
SIEM Query:
source="ckan" AND (action="resource_create" OR action="package_update") AND (resource_id CONTAINS ".." OR resource_id LENGTH > 100)
🔗 References
- https://github.com/ckan/ckan/blob/2a6080e61d5601fa0e2a0317afd6a8e9b7abf6dd/CHANGELOG.rst
- https://github.com/ckan/ckan/security/advisories/GHSA-446m-hmmm-hm8m
- https://github.com/ckan/ckan/blob/2a6080e61d5601fa0e2a0317afd6a8e9b7abf6dd/CHANGELOG.rst
- https://github.com/ckan/ckan/security/advisories/GHSA-446m-hmmm-hm8m