{"id":"CVE-2023-32321","kind":"vulnerability","aliases":["CVE-2023-32321","GHSA-446m-hmmm-hm8m"],"related":[],"title":"Ckan remote code execution and private information access via crafted resource ids","description":"CKAN is an open-source data management system for powering data hubs and data portals. Multiple vulnerabilities have been discovered in Ckan which may lead to remote code execution. An arbitrary file write in `resource_create` and `package_update` actions, using the `ResourceUploader` object.  Also reachable via `package_create`, `package_revise`, and `package_patch` via calls to `package_update`. Remote code execution via unsafe pickle loading, via Beaker's session store when configured to use the file session store backend. Potential DOS due to lack of a length check on the resource id. Information disclosure: A user with permission to create a resource can access any other resource on the system if they know the id, even if they don't have access to it. Resource overwrite: A user with permission to create a resource can overwrite any resource if they know the id, even if they don't have access to it. A user with permissions to create or edit a dataset can upload a resource with a specially crafted id to write the uploaded file in an arbitrary location. This can be leveraged to Remote Code Execution via Beaker's insecure pickle loading. All the above listed vulnerabilities have been fixed in CKAN 2.9.9 and CKAN 2.10.1. Users are advised to upgrade. There are no known workarounds for these issues.","summary":"CKAN's resource_create and package_update actions accept crafted resource ids that write uploaded files to arbitrary locations, and Beaker's file session store unpickles data unsafely, so a dataset editor can reach remote code execution. The same flaw lets users read and overwrite resources they cannot access.","severity":"critical","cvss":9.8,"epss":0.01684,"exploited":false,"exploited_at":null,"products":[{"name":"ckan","fixed":["2.9.9"],"affected":"< 2.9.9","ecosystem":"pypi"},{"name":"ckan","fixed":["2.10.1"],"affected":"= 2.10.0","ecosystem":"pypi"},{"name":"okfn ckan","fixed":["2.9.9"],"affected":">= 2.9.0, < 2.9.9","ecosystem":"vendor"},{"name":"okfn ckan","fixed":[],"affected":"= 2.10.0","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["ckan","cwe-20","package","python","self-hosted"],"not_affected_if":["fixed-version","read-only-portal"],"how_to_check":"- Check the installed CKAN version with `pip show ckan` and compare it to the fixed releases\n- Look at `session.type` in the CKAN config; if it is `file` with Beaker, the remote code execution path is open","fix":"- Upgrade CKAN to `2.9.9` or `2.10.1` or later\n- For older 2.9 installs, apply the upstream patches from the GHSA advisory","status":"open","published_at":"2023-05-24T17:24:56+00:00","first_seen_at":"2026-10-27T16:30:45+00:00","triaged_at":"2026-10-27T16:31:49+00:00","updated_at":"2026-10-27T16:33:07+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-27T16:31:49Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade CKAN to `2.9.9` or `2.10.1` or later\n- For older 2.9 installs, apply the upstream patches from the GHSA advisory","reach":"internet","title":"CKAN: crafted resource ids allow arbitrary file writes and code execution","impact":"high","summary":"CKAN's resource_create and package_update actions accept crafted resource ids that write uploaded files to arbitrary locations, and Beaker's file session store unpickles data unsafely, so a dataset editor can reach remote code execution. The same flaw lets users read and overwrite resources they cannot access.","category":"package","nicknames":[],"who_cares":["ckan","self-hosted","python"],"confidence":0.8,"needs_auth":"yes","worst_case":"Attacker runs code on the CKAN server and reads private resources","analyst_note":"","how_to_check":"- Check the installed CKAN version with `pip show ckan` and compare it to the fixed releases\n- Look at `session.type` in the CKAN config; if it is `file` with Beaker, the remote code execution path is open","needs_analyst":false,"not_affected_if":["read-only-portal","fixed-version"],"who_is_affected":"CKAN instances where users can create or edit datasets and resources, which includes most public and internal data portals. The code execution path needs Beaker's file session store, so deployments using other session backends are exposed only to the file write and data access flaws. Installations that are read-only or already on a fixed version can skip it.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"critical"},"cost_usd":0.000641,"input_tokens":3679,"output_tokens":547,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-20':32B '-2023':14A,22A '-32321':15A,23A '2.10.1':296C '2.9.9':293C '446m':18A 'accept':46B 'access':8A,86B,192C,210C,238C 'action':45B,127C 'advis':299C 'also':132C 'arbitrari':55B,118C,267C 'backend':167C 'beaker':58B,155C,278C 'call':143C 'cannot':85B 'check':176C 'ckan':1A,24A,25A,27A,29A,30B,38B,87C,109C,292C,295C 'code':3A,73B,115C,148C,275C 'configur':160C 'craft':10A,47B,258C 'creat':41B,123C,136C,188C,220C,246C 'cve':13A,21A 'cwe':31B 'data':64B,93C,98C,101C 'dataset':68B,250C 'disclosur':182C 'discov':107C 'dos':169C 'due':170C 'edit':248C 'editor':69B 'even':204C,232C 'execut':4A,74B,116C,149C,276C 'file':53B,60B,119C,164C,264C 'fix':290C 'flaw':77B 'ghsa':17A 'ghsa-446m-hmmm-hm8m':16A 'hm8m':20A 'hmmm':19A 'host':37B 'hub':99C 'id':12A,49B,180C,203C,231C,259C 'inform':7A,181C 'insecur':280C 'issu':309C 'know':201C,229C 'known':305C 'lack':172C 'lead':112C 'length':175C 'let':78B 'leverag':272C 'list':286C 'load':153C,282C 'locat':56B,268C 'manag':94C 'may':111C 'multipl':103C 'object':131C 'okfn':26A,28A 'open':91C 'open-sourc':90C 'overwrit':82B,214C,224C 'packag':33B,43B,125C,135C,137C,140C,145C 'patch':141C 'permiss':186C,218C,244C 'pickl':152C,281C 'portal':102C 'potenti':168C 'power':97C 'privat':6A 'python':34B 'reach':71B 'reachabl':133C 'read':80B 'remot':2A,72B,114C,147C,274C 'resourc':11A,40B,48B,83B,122C,179C,190C,195C,213C,222C,226C,254C 'resourceupload':130C 'revis':138C 'self':36B 'self-host':35B 'session':61B,157C,165C 'sourc':92C 'special':257C 'store':62B,158C,166C 'system':95C,198C 'unpickl':63B 'unsaf':65B,151C 'updat':44B,126C,146C 'upgrad':301C 'upload':52B,252C,263C 'use':128C,162C 'user':79B,184C,216C,242C,297C 'via':9A,134C,142C,150C,154C,277C 'vulner':104C,287C 'workaround':306C 'write':51B,120C,261C","nicknames":[],"mitigations":[],"who_affected":"CKAN instances where users can create or edit datasets and resources, which includes most public and internal data portals. The code execution path needs Beaker's file session store, so deployments using other session backends are exposed only to the file write and data access flaws. Installations that are read-only or already on a fixed version can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2023-05-24T17:24:56+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-446m-hmmm-hm8m","url":"https://github.com/advisories/GHSA-446m-hmmm-hm8m","severity":"critical","published_at":"2023-05-24T17:24:56+00:00","modified_at":"2026-10-27T16:25:45+00:00","first_seen_at":"2026-10-27T16:30:45+00:00","fetched_at":"2026-10-27T16:30:45+00:00","note":null},{"source":"nvd","external_id":"CVE-2023-32321","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-32321","severity":null,"published_at":"2023-05-26T23:15:18+00:00","modified_at":"2026-06-17T05:58:34+00:00","first_seen_at":"2026-10-27T16:33:07+00:00","fetched_at":"2026-10-27T16:33:07+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}