CKAN CVE-2026-42031
HIGHSeverity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network, unauthenticated (PR:N), but requires the non-default sqlsearch feature enabled so AC:H; high confidentiality read, limited integrity, no availability impact.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
5DescriptionGitHub Advisory
Impact
A vulnerability in datastore_search_sql allowed attackers to inject SQL in order to gain access to private resources and PostgreSQL system information.
Patches
The issue has been patched in CKAN 2.10.10 and CKAN 2.11.5
Workarounds
Disable the DataStore SQL search (ckan.datastore.sqlsearch.enabled = false). Note that the SQL search is disabled by default.
More information
As stated in the documentation, this action function has protections that offer some safety but are not designed to prevent all types of abuse. Depending on the sensitivity of private data in a project's DataStore and the likelihood of abuse of a consuming site, a developer may choose to disable this action function or restrict its use with a IAuthFunctions plugin.
Credits
- Reported by Arvin Shivram of Brutecat Security
AnalysisAI
SQL injection in CKAN's datastore_search_sql action allows unauthenticated remote attackers to read private DataStore resources and enumerate PostgreSQL system information by injecting crafted SQL. The flaw affects CKAN versions below 2.10.10 and the 2.11.0-2.11.4 range, and also functions as an authorization bypass since private data protected by CKAN's access controls can be exfiltrated. Publicly available exploit code exists; EPSS rates it in the 87th percentile (3.15%), but it is not listed in CISA KEV and there is no public exploit identified as being actively used in the wild.
Technical ContextAI
CKAN is an open-source data management/portal platform (Python, pip package ckan) widely used by governments and organizations to publish open data catalogs. Its DataStore extension stores tabular resource data in PostgreSQL and exposes a datastore_search_sql action that accepts raw SQL queries against that database. The root cause is CWE-89 (SQL Injection): input-sanitization protections on this action were insufficient, letting an attacker break out of the intended query context to reach private resources and PostgreSQL internal/system catalogs. Per CKAN documentation, datastore_search_sql was always understood to offer only partial safety and is disabled by default via ckan.datastore.sqlsearch.enabled = false.
RemediationAI
Vendor-released patch: upgrade to CKAN 2.10.10 (for 2.10.x deployments) or 2.11.5 (for 2.11.x deployments), both released 2026-04-29 (changelogs: https://docs.ckan.org/en/2.10/changelog.html#v-2-10-10-2026-04-29 and https://docs.ckan.org/en/2.11/changelog.html#v-2-11-5-2026-04-29). If immediate patching is not possible, the primary workaround is to disable the DataStore SQL search by setting ckan.datastore.sqlsearch.enabled = false (this is the default, so most sites are unaffected) - the trade-off is loss of arbitrary SQL query capability for any integrations that rely on it. Where the feature must remain enabled, restrict its use with an IAuthFunctions plugin (https://docs.ckan.org/en/2.11/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IAuthFunctions) to limit which users can invoke datastore_search_sql, accepting the added maintenance overhead of a custom auth extension. See advisory GHSA-h7j7-3rx6-xvcg for full guidance.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-h7j7-3rx6-xvcg